cleanup todo.txt
This commit is contained in:
parent
7c9a3161da
commit
226532f8f3
5 changed files with 7666 additions and 3 deletions
|
|
@ -42,7 +42,8 @@ type
|
||||||
# Page size of the system; in most cases 4096 bytes. For exotic OS or
|
# Page size of the system; in most cases 4096 bytes. For exotic OS or
|
||||||
# CPU this needs to be changed:
|
# CPU this needs to be changed:
|
||||||
const
|
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
|
PageSize = 1 shl PageShift
|
||||||
PageMask = PageSize-1
|
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 'bindSym' support
|
||||||
- pragmas need re-work: 'push' is dangerous, 'hasPragma' does not work
|
- pragmas need re-work: 'push' is dangerous, 'hasPragma' does not work
|
||||||
reliably with user-defined pragmas
|
reliably with user-defined pragmas
|
||||||
- memory manager: add a measure of fragmentation
|
|
||||||
- we need a magic thisModule symbol
|
- we need a magic thisModule symbol
|
||||||
- optimize 'genericReset'; 'newException' leads to code bloat
|
- optimize 'genericReset'; 'newException' leads to code bloat
|
||||||
|
|
||||||
|
|
@ -52,7 +51,6 @@ Bugs
|
||||||
GC
|
GC
|
||||||
==
|
==
|
||||||
|
|
||||||
- use slightly bigger blocks in the allocator
|
|
||||||
- resizing of strings/sequences could take into account the memory that
|
- resizing of strings/sequences could take into account the memory that
|
||||||
is allocated
|
is allocated
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue