cleanup todo.txt

This commit is contained in:
Araq
2017-12-07 15:58:46 +01:00
parent 7c9a3161da
commit 226532f8f3
5 changed files with 7666 additions and 3 deletions

View File

@@ -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

File diff suppressed because it is too large Load Diff

View 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()

View 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()

View File

@@ -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