I am trying to add ‘disable-interrupts’ and ‘enable-interrupts’ to the Racket C code, and am getting this error when doing
‘make base’ unsafe-immutable-hash-iterate-pair: arity mismatch;
the expected number of arguments does not match the given number
expected: 2
given: 1
arguments...:
'#(#<procedure> #<procedure> #<procedure>)
It doesn’t point me to a line number, what did I miss?
I tried to copy how ‘collect_garbage’ is declard
@mflatt @samth
@spall Did you change the version number? Bytecode files depend on the exact set of primitives at the time they were compiled. Meanwhile, can you say more about why disable-interrupts
? That sounds similar to start-atomic
, which is already in one of the built-in modules – but it’s implemented at the “thread” layer, so I don’t have a good guess about your goal.
My goal is to be able to disable garbage collection from a racket program
>Did you change the version number? Bytecode files depend on the exact set of primitives at the time they were compiled. I’m not sure….
Would start-atomic disable garbage collection?
@mflatt to explain more, disable-interrupts
in Chez disables GC, which is what @spall is trying to do — I think her implementation on C-Racket is just (void)
@spall you definitely need to change the version number and disable compiled startup
How do I do that?
@spall start-atomic
won’t disable GC, but you could implement a new operation using scheme_enable_garbage_collection
. Please call it garbage-collection-enabled
, or something like that, instead of disable-interrupts
. I imagine that you’re adding it to #%unsafe
alongside start-atomic
. You’ve probably found “schvers.h” to set the version number. For racket7(-not-on-Chez), you don’t need to disable compiled startup, because that part of the build process is a little more automated than before. Are you trying to disable GC for some testing purpose, or is that needed as part of some implementation?
benchmarking parallelism on chez