Changeset 11092


Ignore:
Timestamp:
Oct 14, 2008, 8:19:31 PM (11 years ago)
Author:
gb
Message:

In Windows code for ensure_stack_limits(), get the real size of
the initial thread's stack and subtract the sizes of our guard
page regions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r11015 r11092  
    181181{
    182182#ifdef WINDOWS
    183 
    184   /* On Windows, the stack is allocated on thread creation.  For the
    185      initial thread, the loader does that, and we cannot change the
    186      stack size after the fact.  For threads we create, we can set the
    187      stack size.  A possible solution is putting the initial thread
    188      asleep and using only runtime-created threads.
    189 
    190      For now, just refuse any attempt to set another stack size, and
    191      return the linker default. */
    192 
    193   return 0x200000;
     183  extern void os_get_current_thread_stack_bounds(void **, natural*);
     184  natural totalsize;
     185  void *ignored;
     186 
     187  os_get_current_thread_stack_bounds(&ignored, &totalsize);
     188
     189  return (size_t)totalsize-(size_t)(CSTACK_HARDPROT+CSTACK_SOFTPROT);
    194190
    195191#else
Note: See TracChangeset for help on using the changeset viewer.