1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

* gc_os_dep.c (scm_get_stack_base) [MSWIN32]: Added detection of

page size on the w32 architecture.  Updated from Boehms gc5.2.
Thanks to Lars J. Aas!
This commit is contained in:
Marius Vollmer 2000-12-11 18:09:07 +00:00
parent 85db4a2c8e
commit 70f9533342

View file

@ -1572,9 +1572,16 @@ void *scm_get_stack_base()
{
int dummy;
ptr_t sp = (ptr_t)(&dummy);
ptr_t trunc_sp = (ptr_t)((word)sp & ~(GC_page_size - 1));
word size = GC_get_writable_length(trunc_sp, 0);
ptr_t trunc_sp;
word size;
static word GC_page_size = 0;
if (!GC_page_size) {
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
GC_page_size = sysinfo.dwPageSize;
}
trunc_sp = (ptr_t)((word)sp & ~(GC_page_size - 1));
size = GC_get_writable_length(trunc_sp, 0);
return(trunc_sp + size);
}