Date: Sat, 21 Dec 1996 20:28:00 -0500 (EST) From: "Marc G. Fournier" <scrappy@hub.org> To: hackers@freebsd.org Subject: MMAP() problem partially solved... Message-ID: <Pine.BSF.3.95.961221202328.1105E-100000@thelab.hub.org>
next in thread | raw e-mail | index | archive | help
Hi... First off, I've sort of found the problem I was having with storing and recovering the 'int' value from the mmap()'d region... Since I was doing 'sprintf(mem_loc, "%d", value);', I was attempting to store a 5byte char into a 4byte region, so memory overruns. I've changed things so that I'm allocating 10bytes of space instead of 'sizeof(int)' to get around that.. Still curious as to whether there is something better I should be using, mind you...something like 'mem_loc = (char *)&size;'? Oh well...back to the code...sorry for the disruption...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961221202328.1105E-100000>