mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 10:54:42 +00:00
cleanup todo.txt
This commit is contained in:
@@ -42,7 +42,8 @@ type
|
||||
# Page size of the system; in most cases 4096 bytes. For exotic OS or
|
||||
# CPU this needs to be changed:
|
||||
const
|
||||
PageShift = when defined(cpu16): 8 else: 12
|
||||
PageShift = when defined(cpu16): 8 else: 12 # \
|
||||
# my tests showed no improvments for using larger page sizes.
|
||||
PageSize = 1 shl PageShift
|
||||
PageMask = PageSize-1
|
||||
|
||||
|
||||
7629
tests/fragmentation/data.nim
Normal file
7629
tests/fragmentation/data.nim
Normal file
File diff suppressed because it is too large
Load Diff
19
tests/fragmentation/tfragment_alloc.nim
Normal file
19
tests/fragmentation/tfragment_alloc.nim
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
|
||||
include system/ansi_c
|
||||
|
||||
import strutils, data
|
||||
|
||||
proc main =
|
||||
var m = 0
|
||||
for i in 0..1000_000:
|
||||
let size = sizes[i mod sizes.len]
|
||||
let p = alloc(size)
|
||||
if p == nil:
|
||||
quit "could not serve request!"
|
||||
dealloc p
|
||||
# c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)
|
||||
|
||||
main()
|
||||
echo formatSize getOccupiedMem(), " / ", formatSize getTotalMem()
|
||||
16
tests/fragmentation/tfragment_gc.nim
Normal file
16
tests/fragmentation/tfragment_gc.nim
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
|
||||
#include system/ansi_c
|
||||
|
||||
import strutils, data
|
||||
|
||||
proc main =
|
||||
var m = 0
|
||||
for i in 0..1000_000:
|
||||
let size = sizes[i mod sizes.len]
|
||||
let p = newString(size)
|
||||
# c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)
|
||||
|
||||
main()
|
||||
echo formatSize getOccupiedMem(), " / ", formatSize getTotalMem()
|
||||
2
todo.txt
2
todo.txt
@@ -31,7 +31,6 @@ Not critical for 1.0
|
||||
- pragmas need 'bindSym' support
|
||||
- pragmas need re-work: 'push' is dangerous, 'hasPragma' does not work
|
||||
reliably with user-defined pragmas
|
||||
- memory manager: add a measure of fragmentation
|
||||
- we need a magic thisModule symbol
|
||||
- optimize 'genericReset'; 'newException' leads to code bloat
|
||||
|
||||
@@ -52,7 +51,6 @@ Bugs
|
||||
GC
|
||||
==
|
||||
|
||||
- use slightly bigger blocks in the allocator
|
||||
- resizing of strings/sequences could take into account the memory that
|
||||
is allocated
|
||||
|
||||
|
||||
Reference in New Issue
Block a user