[openib-general] Mmap, 32 bit machine, limit

Rochford, Nigel Nigel.Rochford at HarperCollins.co.uk
Wed Jun 22 02:10:41 PDT 2005


Hi,

I'm using the c function "mmap" to memory map binary files into an
int**. (on a 32 bit machine).
There are a total of 22 files - the maximum of which is about 450MB.
Since 4 bytes per int, this will imply 112M addresses will be needed.

So:

array[0] = file1
array[1] = file2
array[21] = file22

In total, these 22 files come to about 3.4GB - roughly 850M addresses.

However, the function crashes and gives out the message ENOMEM after
mapping about 2.6GB.

Does anyone know what's going wrong??? None of it makes sense to me
because:

(a) 	if problem was that 2^31 max addresses, then would crash surely
after mapping 2^31bytes (less than 2.6)
(b)	problem doesn't seem to be lack of swap space.

Is there a maximum memory limit in mapping?

Nigel Rochford
Analyst Programmer
+44 306 3563



**********************************************************************
This message is intended only for the use of the individual(s) to which
it is addressed and may contain information that is privileged and
confidential.
  If you are not the intended recipient, you are hereby notified that
you have received this transmission in error; any review, dissemination,
distribution or copying of this transmission is strictly prohibited.
  If you have received this communication in error, please notify us
immediately by reply e-mail and delete this message and all of its attachments.
**********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050622/aaa5c9f5/attachment.html>


More information about the general mailing list