Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Memory-allocation/Racket/memory-allocation.rkt
Normal file
11
Task/Memory-allocation/Racket/memory-allocation.rkt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#lang racket
|
||||
(collect-garbage) ; This function forces a garbage collection
|
||||
|
||||
(current-memory-use) ;Gives an estimate on the memory use based on the last garbage collection
|
||||
|
||||
(custodian-require-memory <limit-custodian>
|
||||
<amount>
|
||||
<stop-custodian>) ; Registers a check on required memory for the <limit-custodian>
|
||||
; If amount of bytes can't be reached, <stop-custodian> is shutdown
|
||||
|
||||
(custodian-limit-memory <custodian> <amount>) ; Register a limit on memory for the <custodian>
|
||||
Loading…
Add table
Add a link
Reference in a new issue