Thomas Hoffmann
2003-10-19 21:05:14 UTC
I ran into problems with an application that malloc()s memory from
within a DLL.
Now I vaguely remember to have read about problems with using more than
32MB heap
(a Readme for gcc 3.x said:
I can't allocate more than 32 Mb of memory. What to do?
That's an EMX feature. Usually EMX applications are limited to
using a 32MB heap because the fork() logic expects the heap to be
allocated in one
big segment. If you don't use fork(), you can use the _uflags() function
to tell the EMX runtime that you don't want your heap to be contiguous.
)
Then I looked into the EMX docs, they say (for _uflags()):
_UF_SBRK_CONTIGUOUS sbrk() always allocates contiguous memory; the size
of the heap is
limited to the initial heap size. This is the initial setting; however,
the malloc() implementation of emx
selects _UF_SBRK_ARBITRARY
Now I am somewhat puzzled: What ARE the restrictions for heap usage and
HOW can I work around
them?
Thomas.
within a DLL.
Now I vaguely remember to have read about problems with using more than
32MB heap
(a Readme for gcc 3.x said:
I can't allocate more than 32 Mb of memory. What to do?
That's an EMX feature. Usually EMX applications are limited to
using a 32MB heap because the fork() logic expects the heap to be
allocated in one
big segment. If you don't use fork(), you can use the _uflags() function
to tell the EMX runtime that you don't want your heap to be contiguous.
)
Then I looked into the EMX docs, they say (for _uflags()):
_UF_SBRK_CONTIGUOUS sbrk() always allocates contiguous memory; the size
of the heap is
limited to the initial heap size. This is the initial setting; however,
the malloc() implementation of emx
selects _UF_SBRK_ARBITRARY
Now I am somewhat puzzled: What ARE the restrictions for heap usage and
HOW can I work around
them?
Thomas.
--
Thomas Hoffmann
thoffman-***@public.gmane.org Dresden, Germany
Thomas Hoffmann
thoffman-***@public.gmane.org Dresden, Germany