Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 7:43:24 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet Physics Engine from v2.74 to v2.77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/bullet/LinearMath/btAlignedAllocator.cpp

    r5781 r7983  
    161161{
    162162        gNumAlignedAllocs++;
    163   void* ptr;
    164 #if defined (BT_HAS_ALIGNED_ALLOCATOR) || defined(__CELLOS_LV2__)
     163        void* ptr;
    165164        ptr = sAlignedAllocFunc(size, alignment);
    166 #else
    167   char *real;
    168   unsigned long offset;
    169 
    170   real = (char *)sAllocFunc(size + sizeof(void *) + (alignment-1));
    171   if (real) {
    172     offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1);
    173     ptr = (void *)((real + sizeof(void *)) + offset);
    174     *((void **)(ptr)-1) = (void *)(real);
    175   } else {
    176     ptr = (void *)(real);
    177   }
    178 #endif  // defined (BT_HAS_ALIGNED_ALLOCATOR) || defined(__CELLOS_LV2__)
    179165//      printf("btAlignedAllocInternal %d, %x\n",size,ptr);
    180166        return ptr;
     
    190176        gNumAlignedFree++;
    191177//      printf("btAlignedFreeInternal %x\n",ptr);
    192 #if defined (BT_HAS_ALIGNED_ALLOCATOR) || defined(__CELLOS_LV2__)
    193178        sAlignedFreeFunc(ptr);
    194 #else
    195   void* real;
    196 
    197   if (ptr) {
    198     real = *((void **)(ptr)-1);
    199     sFreeFunc(real);
    200   }
    201 #endif  // defined (BT_HAS_ALIGNED_ALLOCATOR) || defined(__CELLOS_LV2__)
    202179}
    203180
Note: See TracChangeset for help on using the changeset viewer.