Re: malloc beyond 20MB fails. Why so limited?



itsolution@xxxxxxxxx wrote:
Hi Guru,

I need some data cache (which I want is able to keep tens of thousands
entries) containing DB data in my Unix running process. Each cache
entry is around 0.5k bytes. So, I want to create the Cache area in my
Unix process when the process starts up.
To the contrary to my expectation, once malloc(0.5k) is called
beyond 4000 times, then, trailing malloc() continues to fail.

Isn't it the heap space should be much bigger than 20MB in a Unix
process ?
Why malloc is failing at not big size allocation ?
Any workaround or advice?


thanks


Besides checking what Mr McLean told you, check the permissions.
(ulimit). Sometimes administrators limit what a user process can
allocate.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.



Relevant Pages

  • Re: malloc beyond 20MB fails. Why so limited?
    ... I need some data cache (which I want is able to keep tens of thousands ... Unix process when the process starts up. ... beyond 4000 times, then, trailing malloc() continues to fail. ...
    (comp.lang.c)
  • malloc beyond 20MB fails. Why so limited?
    ... I need some data cache (which I want is able to keep tens of thousands ... Unix process when the process starts up. ... beyond 4000 times, then, trailing malloc() continues to fail. ...
    (comp.lang.c)
  • Re: malloc beyond 20MB fails. Why so limited?
    ... I need some data cache (which I want is able to keep tens of thousands ... Unix process when the process starts up. ... beyond 4000 times, then, trailing malloc() continues to fail. ...
    (comp.lang.c)
  • Re: malloc beyond 20MB fails. Why so limited?
    ... I need some data cache (which I want is able to keep tens of thousands ... Unix process when the process starts up. ... beyond 4000 times, then, trailing malloc() continues to fail. ... with a particular platform/system setup, or an undetected error in the ...
    (comp.lang.c)
  • Re: Concurrent i/o
    ... I don't see why disabling the UNIX cache would ... After all, Oracle doesn't ... It might or might not use Unix file system cache depending on the Unix ...
    (comp.databases.oracle.server)