Subversion Repositories Kolibri OS

Rev

Rev 6099 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6099 Rev 6536
Line 380... Line 380...
380
  mchunkptr  smallbins[(NSMALLBINS+1)*2];
380
  mchunkptr  smallbins[(NSMALLBINS+1)*2];
381
  tbinptr    treebins[NTREEBINS];
381
  tbinptr    treebins[NTREEBINS];
382
  size_t     footprint;
382
  size_t     footprint;
383
  size_t     max_footprint;
383
  size_t     max_footprint;
384
  flag_t     mflags;
384
  flag_t     mflags;
385
  __libc_lock_recursive_t  lock;     /* locate lock among fields that rarely change */
385
  _LOCK_RECURSIVE_T    lock;     /* locate lock among fields that rarely change */
386
  msegment   seg;
386
  msegment   seg;
387
  void*      extp;      /* Unused but available for extensions */
387
  void*      extp;      /* Unused but available for extensions */
388
  size_t     exts;
388
  size_t     exts;
389
};
389
};
Line 423... Line 423...
423
 
423
 
Line 424... Line 424...
424
 
424
 
425
 
425
 
Line 426... Line 426...
426
__LOCK_INIT_RECURSIVE(static, malloc_global_mutex);
426
__LOCK_INIT_RECURSIVE(static, malloc_global_mutex);
427
 
427
 
Line 428... Line 428...
428
#define ACQUIRE_MALLOC_GLOBAL_LOCK()  __libc_lock_lock_recursive(malloc_global_mutex);
428
#define ACQUIRE_MALLOC_GLOBAL_LOCK()  __lock_acquire_recursive(malloc_global_mutex);
Line 429... Line 429...
429
#define RELEASE_MALLOC_GLOBAL_LOCK()  __libc_lock_unlock_recursive(malloc_global_mutex);
429
#define RELEASE_MALLOC_GLOBAL_LOCK()  __lock_release_recursive(malloc_global_mutex);
430
 
430
 
Line 989... Line 989...
989
        mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
989
        mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
990
        mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
990
        mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
Line 991... Line 991...
991
 
991
 
992
    /* Set up lock for main malloc area */
992
    /* Set up lock for main malloc area */
993
        gm->mflags = mparams.default_mflags;
993
        gm->mflags = mparams.default_mflags;
Line 994... Line 994...
994
        __libc_lock_init_recursive(gm->lock);
994
        __lock_init_recursive(gm->lock);
995
 
995
 
996
        magic = (size_t)(0x12345678 ^ (size_t)0x55555555U);
996
        magic = (size_t)(0x12345678 ^ (size_t)0x55555555U);
997
        magic |= (size_t)8U;    /* ensure nonzero */
997
        magic |= (size_t)8U;    /* ensure nonzero */