From 006956c142e5b03808cc1d6d2c8710d8c59d59cc Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 21 Mar 1995 01:05:22 +0000 Subject: [PATCH] Add new primitive to scan Scheme's memory usage. --- v7/src/microcode/pros2fs.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/v7/src/microcode/pros2fs.c b/v7/src/microcode/pros2fs.c index 2f0f386b6..41b745cf6 100644 --- a/v7/src/microcode/pros2fs.c +++ b/v7/src/microcode/pros2fs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pros2fs.c,v 1.3 1995/01/31 22:11:35 cph Exp $ +$Id: pros2fs.c,v 1.4 1995/03/21 01:05:22 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -388,3 +388,21 @@ DEFINE_PRIMITIVE ("CURRENT-PID", Prim_current_pid, 0, 0, PRIMITIVE_HEADER (0); PRIMITIVE_RETURN (long_to_integer (OS2_scheme_pid)); } + +DEFINE_PRIMITIVE ("DOS-QUERY-MEMORY", Prim_dos_query_memory, 2, 2, 0) +{ + PRIMITIVE_HEADER (2); + { + ULONG start = (arg_nonnegative_integer (1)); + ULONG length = (arg_nonnegative_integer (2)); + ULONG flags; + XTD_API_CALL + (dos_query_mem, (((PVOID) start), (&length), (&flags)), + { + if (rc == ERROR_INVALID_ADDRESS) + PRIMITIVE_RETURN (SHARP_F); + }); + PRIMITIVE_RETURN (cons ((ulong_to_integer (length)), + (ulong_to_integer (flags)))); + } +} -- 2.25.1