Changeset 10933


Ignore:
Timestamp:
Oct 1, 2008, 12:12:56 AM (11 years ago)
Author:
gb
Message:

Work around win32 malloc alignment limitations when allocating tcr
using tcr.allocated.

File:
1 edited

Legend:

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

    r10916 r10933  
    759759}
    760760
     761#ifdef WIN_32
     762TCR *
     763allocate_tcr()
     764{
     765  void *p = calloc(1,sizeof(TCR)+15);
     766  TCR *tcr = (TCR *)((((natural)p)+15)&~15);
     767
     768  tcr->allocated = p;
     769  return tcr;
     770}
     771#else
    761772TCR *
    762773allocate_tcr()
     
    802813  }
    803814}
     815#endif
    804816
    805817#ifdef X8664
     
    19321944    next = current->next;
    19331945#ifndef HAVE_TLS
     1946#ifdef WIN32
     1947    free(current->allocated);
     1948#else
    19341949    free(current);
     1950#endif
    19351951#endif
    19361952  }
Note: See TracChangeset for help on using the changeset viewer.