-#define ALLOC_OVERFLOW(size) \
- /* Calculate the size for the allocation. */ \
- subl START_REGION,size; \
- ALLOC(size)
+#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_WIN32)
+#define ALLOC_OVERFLOW(size,scratch) \
+ movl SBCL_THREAD_BASE_EA, scratch; \
+ /* Calculate the size for the allocation. */ \
+ subl THREAD_ALLOC_REGION_OFFSET(scratch),size; \
+ ALLOC(size)
+#else
+#define ALLOC_OVERFLOW(size,scratch) \
+ /* Calculate the size for the allocation. */ \
+ subl START_REGION,size; \
+ ALLOC(size)
+#endif