Search found 37 matches: reallocate

Return to advanced search

Re: hb_xrealloc can't reallocate memory

All, I put together a quick buffer class and I did some simple testing and it seems to be working. Give it a try. James /*Purpose  : Write buffer classAuthor   : James Bott, jbott@compuserve.comDate     : 9/3/2015 9:04:36 AMCompany  : IntellitechCopyright: Copyright © 2015 IntellitechLanguage : Five...
by James Bott
Thu Sep 03, 2015 5:59 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Hi Enrico, We need to clear understand if and where the problem is. IMHO the "where" is clear: buffering in a string built of small pieces in a intense computing program could lead in reallocation problems due to Harbour's memory management lack of garbage collection. It is a known problem...
by Carlos Mora
Thu Sep 03, 2015 9:33 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

James, Enrico, I think that you must have the problematic code in your hands, then try a possible solution. I'm not sure what you mean--that the problem was in my code? I dont' know, but I know that you should not make "premature optimization". We don't need a general tool for buffered wri...
by Enrico Maria Giordano
Thu Sep 03, 2015 8:29 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

James, So I am thinking that in order to use a buffer and prevent memory fragmentation I could pre-allocate a blank string of 400 line by 80 characters as my buffer. Then just keep replacing the spaces in the string with text until it is full, then write to disk. +1, access to the filesystems is alw...
by Carlos Mora
Thu Sep 03, 2015 7:05 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Tim, My point is that maybe there is a way to gather a sufficient amount of data between each commit that will speed up the process. If you are talking about the ADORDD and the commit after each record, then I agree, and I am the one who pointed it out as an issue. But the ADO functions apparently d...
by James Bott
Thu Sep 03, 2015 1:13 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

When I first started working with dBase in CP/M, the machine had little memory, used floppy disks, and drove a monochrome monitor. The programming skills I learned by working in the very small resource setting is a benefit today, even with our faster machines that have ample resources. James, Initia...
by TimStone
Wed Sep 02, 2015 10:42 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Enrico, I think that you must have the problematic code in your hands, then try a possible solution. I'm not sure what you mean--that the problem was in my code? Which example are you referring to. For one the code was simply APPEND FROM [filename]. The other was read line, write line. In both cases...
by James Bott
Wed Sep 02, 2015 10:01 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

James, Enrico, Yes that is the one. It only had a cassette drive to store data. It took about a half hour just to load the program I wrote (in BASIC). Then another half hour to load the data. Then after it started processing it would hang for 10 minutes to an hour. Whew! It was still better than a p...
by Enrico Maria Giordano
Wed Sep 02, 2015 9:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

James,

I think that you must have the problematic code in your hands, then try a possible solution.

EMG
by Enrico Maria Giordano
Wed Sep 02, 2015 9:10 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Enrico, Yes that is the one. It only had a cassette drive to store data. It took about a half hour just to load the program I wrote (in BASIC). Then another half hour to load the data. Then after it started processing it would hang for 10 minutes to an hour. Whew! It was still better than a pocket c...
by James Bott
Wed Sep 02, 2015 9:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Carlos, In my case, i changed the function to not use the buffer, but write directly to the resulting file, Just a few days ago I was processing a lot of large files with a program I wrote in FWH. It was reading and writing each line from and to disk. I was taking an incredibly long time with the di...
by James Bott
Wed Sep 02, 2015 9:02 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

Tim,

great! :-)

EMG
by Enrico Maria Giordano
Wed Sep 02, 2015 7:31 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

My first was a Toshiba T100 running CP/M ( with dBase II even ), pictured here: http://www.oldcomputers.net/toshiba-t100.html Not shown in this listing are the Dual floppy drive box and the monitor.
by TimStone
Wed Sep 02, 2015 7:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221

Re: hb_xrealloc can't reallocate memory

James,

James Bott wrote:I still remember on my first computer, a Radio Shack TRS-80,


:-)

EMG
by Enrico Maria Giordano
Wed Sep 02, 2015 5:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: hb_xrealloc can't reallocate memory
Replies: 21
Views: 7221
Next

Return to advanced search

cron