diff options
author | Araq <rumpf_a@web.de> | 2011-01-31 08:50:30 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-01-31 08:50:30 +0100 |
commit | 9387913b734e1a8f4c90acdfcbdc7f92a9892244 (patch) | |
tree | 72af335d0315f5834ba39faabb4ab0be5a29dac3 /lib/system | |
parent | c9f4ad0613dd5b7d0f3942b39ba212a136da3986 (diff) | |
download | Nim-9387913b734e1a8f4c90acdfcbdc7f92a9892244.tar.gz |
documentation improvements
Diffstat (limited to 'lib/system')
-rwxr-xr-x | lib/system/alloc.nim | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index 840107440..0e0b450b4 100755 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -329,7 +329,6 @@ proc ListRemove[T](head: var T, c: T) {.inline.} = proc isSmallChunk(c: PChunk): bool {.inline.} = return c.size <= SmallChunkSize-smallChunkOverhead() - #return c.size < SmallChunkSize proc chunkUnused(c: PChunk): bool {.inline.} = result = not c.used @@ -377,9 +376,6 @@ proc freeBigChunk(a: var TAllocator, c: PBigChunk) = proc splitChunk(a: var TAllocator, c: PBigChunk, size: int) = var rest = cast[PBigChunk](cast[TAddress](c) +% size) assert(rest notin a.freeChunksList) - # c_fprintf(c_stdout, "to add: %p\n", rest) - # writeFreeList(allocator) - # assert false rest.size = c.size - size rest.used = false rest.next = nil @@ -397,14 +393,11 @@ proc getBigChunk(a: var TAllocator, size: int): PBigChunk = result = a.freeChunksList block search: while result != nil: - #if not chunkUnused(result): - # c_fprintf(c_stdout, "%lld\n", int(result.used)) assert chunkUnused(result) if result.size == size: ListRemove(a.freeChunksList, result) break search elif result.size > size: - #c_fprintf(c_stdout, "res size: %lld; size: %lld\n", result.size, size) ListRemove(a.freeChunksList, result) splitChunk(a, result, size) break search |