fix `current-memory-use'
Closes PR 9896
This commit is contained in:
parent
1b7bda5f2a
commit
10246d7ade
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
(Section 'wills)
|
(Section 'wills)
|
||||||
|
|
||||||
|
(test #t exact-nonnegative-integer? (current-memory-use))
|
||||||
|
(test #t exact-nonnegative-integer? (current-memory-use #f))
|
||||||
|
(test #t exact-nonnegative-integer? (current-memory-use (current-custodian)))
|
||||||
|
|
||||||
(test #f will-executor? 5)
|
(test #f will-executor? 5)
|
||||||
(test #t will-executor? (make-will-executor))
|
(test #t will-executor? (make-will-executor))
|
||||||
|
|
||||||
|
|
|
@ -674,13 +674,13 @@ static Scheme_Object *current_memory_use(int argc, Scheme_Object *args[])
|
||||||
intptr_t retval = 0;
|
intptr_t retval = 0;
|
||||||
|
|
||||||
if (argc) {
|
if (argc) {
|
||||||
if(SAME_TYPE(SCHEME_TYPE(args[0]), scheme_custodian_type)) {
|
if (SCHEME_FALSEP(args[0])) {
|
||||||
arg = args[0];
|
arg = args[0];
|
||||||
} else if(SCHEME_PROCP(args[0])) {
|
} else if (SAME_TYPE(SCHEME_TYPE(args[0]), scheme_custodian_type)) {
|
||||||
arg = args[0];
|
arg = args[0];
|
||||||
} else {
|
} else {
|
||||||
scheme_wrong_type("current-memory-use",
|
scheme_wrong_type("current-memory-use",
|
||||||
"custodian or memory-trace-function",
|
"custodian or #f",
|
||||||
0, argc, args);
|
0, argc, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user