For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > December 2007 > Heap memory allocation (over 2x MB ) failure issue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Heap memory allocation (over 2x MB ) failure issue
itsolution@gmail.com

2007-12-30, 8:07 am


I got an issue with a network device running BSD(6.x)
That device has enough memory(over 512MB).
But, in a process, I tried to allocate a heap memory to be used for
memory pool.
But, malloc(1024 * 20000) is ok but malloc(1024 * 25000 or above)
always fails.
Looks like due to ulimit issue or similar limit ... right?
How do I find whether some limit is set in this BSD?

To work around this unexpected limitation, I try to use global static
memory instead of heap memory.
So, when implementing a memory pool of having 30MB or so,
using global static memory instead of using heap is the better
way ?

thanks

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com