[comp.sys.atari.st] Malloc on 2.5 Meg 1040stf - help needed

hans@duttnph.tudelft.nl (Hans Buurman) (12/23/89)

I think I'll need help on this one...
I recently upgraded my 1040 stf to 2.5 Mb using a kit by Weide
(although this is not a hardware problem). I found that one of
the programs I use intensively (turbo c linker) won't make full
use of the extra memory. The reason is the following:

This linker uses gemdos call 0x48 (Malloc) at least twice for
each file read. It appears that this call can only be issued
some 300 times, after which it fails, regardless of the amount
of free memory. This problem does not occur on a Mega ST !
Maybe it is only present in early gemdos versions ? (I bought
the 1040stf in March, 1987).

Right now, my workaround is to link from the desktop, without
ramdisk, turbodos, etc. I'm cooperating in a large project,
so I really could use a solution. Can anybody help me ?

Anyway, merry Chistmas everybody !

	Hans

========================================================================
Hans Buurman               | hans@duttnph.tudelft.nl | hans@duttnph.UUCP
Pattern Recognition Group  | 31-(0)15-78 46 94       |
Faculty of Applied Physics | Delft University of Technology

hcj@lzaz.ATT.COM (HC Johnson) (12/26/89)

In article <1055@dutrun.UUCP>, hans@duttnph.tudelft.nl (Hans Buurman) writes:
> 
> 
> This linker uses gemdos call 0x48 (Malloc) at least twice for
> each file read. It appears that this call can only be issued
> some 300 times, after which it fails, regardless of the amount
> of free memory. 

I had this problem using MWC.  There is a real Malloc() call to get space
for malloc() to distribute.  Since there is a real limit on how many
times you can call Malloc, I found that 
MWC has a variable that changes the size of the chunk each Malloc() asks
for.  I find the free space, divide it by 32, and tell malloc to ask for
that much each time it does a Malloc(). (in MWC the variable is 
_aclicksize).


Howard C. Johnson
ATT Bell Labs
att!lzaz!hcj
hcj@lzaz.att.com

.

hintz@quando.UUCP (Stefan Hintz) (01/08/90)

In article <1055@dutrun.UUCP> hans@duttnph.UUCP (Hans Buurman) writes:

>I recently upgraded my 1040 stf to 2.5 Mb using a kit by Weide
>(although this is not a hardware problem). I found that one of
>the programs I use intensively (turbo c linker) won't make full
>use of the extra memory. The reason is the following:

>This linker uses gemdos call 0x48 (Malloc) at least twice for
>each file read. It appears that this call can only be issued
>some 300 times, after which it fails, regardless of the amount
>of free memory. This problem does not occur on a Mega ST !
>Maybe it is only present in early gemdos versions ? (I bought
>the 1040stf in March, 1987).

(stuff deleted)


--


I had this Malloc-Problem too, even with a Mega ST2 .
The solution was to put a FOLDR300.PRG into the AUTO-folder.



I hope this will help you.

	Stefan Hintz, Dortmund, WestGermany.

	hintz@quando.unido.UUCP (Stefan Hintz)