cleanup todo.txt
This commit is contained in:
parent
7c9a3161da
commit
226532f8f3
5 changed files with 7666 additions and 3 deletions
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue