[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Mon Dec 29 11:23:41 CET 2008


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	08/12/29 11:23:41

Modified files:
	cm3/m3-libs/m3core/src/runtime/POSIX/: m3makefile 
	cm3/m3-libs/m3core/src/runtime/WIN32/: RTOS.m3 m3makefile 
	cm3/m3-libs/m3core/src/runtime/common/: RTOS.i3 
	cm3/m3-libs/m3core/src/unix/cygwin/: m3makefile 
	cm3/m3-libs/m3core/src/unix/linux-common/: m3makefile 
	cm3/m3-libs/m3core/src/unix/openbsd-common/: m3makefile 
Added files:
	cm3/m3-libs/m3core/src/runtime/POSIX/: RTOSbrk.c RTOSmmap.c 
	cm3/m3-libs/m3core/src/runtime/WIN32/: RTOSc.c 
Removed files:
	cm3/m3-libs/m3core/src/runtime/POSIX/: RTOSbrk.m3 RTOSmmap.m3 
	cm3/m3-libs/m3core/src/unix/cygwin/: Umman.i3 
	cm3/m3-libs/m3core/src/unix/linux-common/: Umman.i3 
	cm3/m3-libs/m3core/src/unix/openbsd-common/: Umman.i3 

Log message:
	Remove the only use of Umman.i3 in systems without user thread support.
	
	As a side effect, since one RTOS.GetMemory shall be rewritten in C, so
	shall they all. It would be nice if the <*external*> was not needed
	as long as the names were chosen right, and I avoided m3makefile tricks
	of only inserting <*external*> in one of the three implementations.
	
	Punt on writing the "entire" few lines of Win32 GetMemory in C,
	and just a smaller subset. The whole thing is not a big deal, but
	does it buy much or anything?
	
	As a bonus, fix Win32 "page size" so that there is no "rounding loss",
	noticed watching the allocations to see if the "simplification"
	resulted
	in much lost adjacency and hole production. In the sample of watching
	mklib be built, the second allocation is indeed no adjacent to the
	first,
	but allocations are adjacent thereafter.
	Adjacency is desirable because RTAllocater/Collecter builds data
	structures
	spanning the heap, including holes. The historic Win32 allocater
	reserved
	64M address space up front, and then individual VirtualAlloc calls
	thereafter.
	Implementation here just calls VirtualAlloc.
	HeapAlloc and calloc should also be viable, and calloc is portable,
	but the
	allocations are large, and never freed, so maybe not.
	
	As a bonus, found RTCollector.i3 bug for pagesize=64K (or larger?)
	
	Also eliminate an unnecessary global in Win32/RTOS.m3.




More information about the M3commit mailing list