[CentOS] top and allocation issues

Thu Mar 3 20:11:08 UTC 2011
Brunner, Brian T. <BBrunner at gai-tronics.com>

centos-bounces at centos.org wrote:
> 
> Yes, I do expect to do a bit of arithmetic.  I will need
> several blocks of about 0.5G, and I am checking the limits.
> Is it true, then, that I won't really know if I succeeded with
> the allocation until I try to write the memory? What will
> happen then? Is there a way to check without actually writing?

That's where the malloc() bug can hit you.  The bits I spoke of are only
in the table of pages of your process' virtual memory.  That's limited
to 4GB without some mechanism getting past the 32-bit-addressing-snag.
If you use calloc(), you discover at page-allocation-time that either
your virtual space, or the system virtual space, is exhausted; this is
preferable to discovery in the nth iteration of some deeply-buried loop
that wrote to the 'one page too many'.

Stephen: Good clue on the overcommit_momory setting.  I'd forgotten it.

Can you work on only one file at a time, each file under GOB, or do you
must-have more than GOB of data in front of you at a time?

Insert spiffy .sig here


//me
*******************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please
notify the system manager. This footnote also confirms that this
email message has been swept for the presence of computer viruses.
www.Hubbell.com - Hubbell Incorporated**