Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Apr 1996 16:51:38 +1000
From:      Stephen Hocking <sysseh@devetir.qld.gov.au>
To:        current@freebsd.org
Subject:   mmap vs malloc - what gives?
Message-ID:  <199604210651.GAA19816@netfl15a.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
Mixing mmap & malloc appears to be a recipe for much grief. mmap doesn't seem 
to take much notice of what's already malloced and occasionally drops its 
region over the top of some already malloced space. I've tried with the addr 
parameter set to something which is malloced to be the same size as the file 
being mmaped in, I've tried it set to zero, I've tried doing my mallocing all 
before the mmap and (where possible) all after. No dice.

(For the curious, the application in question is a re-implementation of the 
doom soundserver which gropes through the wadfile using mmap. I'm 
re-implementing it so I can send the sounds off to the NAS soundserver)


	Stephen
-- 
The views expressed above are not those of the Worker's Compensation Board of
Queensland, Australia.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604210651.GAA19816>