Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/jemalloc/chromium/jemalloc.c

Issue 10828054: Modify allocator_shim to support _aligned_alloc(), _aligned_free(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit tests. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode: C; tab-width: 8; c-basic-offset: 8 -*- */ 1 /* -*- Mode: C; tab-width: 8; c-basic-offset: 8 -*- */
2 /* vim:set softtabstop=8 shiftwidth=8: */ 2 /* vim:set softtabstop=8 shiftwidth=8: */
3 /*- 3 /*-
4 * Copyright (C) 2006-2008 Jason Evans <jasone@FreeBSD.org>. 4 * Copyright (C) 2006-2008 Jason Evans <jasone@FreeBSD.org>.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 6130 matching lines...) Expand 10 before | Expand all | Expand 10 after
6141 #endif 6141 #endif
6142 6142
6143 #if defined(DONT_OVERRIDE_LIBC) 6143 #if defined(DONT_OVERRIDE_LIBC)
6144 #define malloc(a) je_malloc(a) 6144 #define malloc(a) je_malloc(a)
6145 #define valloc(a) je_valloc(a) 6145 #define valloc(a) je_valloc(a)
6146 #define calloc(a, b) je_calloc(a, b) 6146 #define calloc(a, b) je_calloc(a, b)
6147 #define realloc(a, b) je_realloc(a, b) 6147 #define realloc(a, b) je_realloc(a, b)
6148 #define free(a) je_free(a) 6148 #define free(a) je_free(a)
6149 #define _msize(p) je_msize(p) 6149 #define _msize(p) je_msize(p)
6150 #define _recalloc(p, n, s) je_recalloc(p, n, s) 6150 #define _recalloc(p, n, s) je_recalloc(p, n, s)
6151 #define memalign(a, s) je_memalign(a, s)
6151 #endif 6152 #endif
6152 6153
6153 ZONE_INLINE 6154 ZONE_INLINE
6154 void * 6155 void *
6155 malloc(size_t size) 6156 malloc(size_t size)
6156 { 6157 {
6157 void *ret; 6158 void *ret;
6158 6159
6159 if (malloc_init()) { 6160 if (malloc_init()) {
6160 ret = NULL; 6161 ret = NULL;
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
7267 7268
7268 #elif defined(RTLD_DEEPBIND) 7269 #elif defined(RTLD_DEEPBIND)
7269 /* 7270 /*
7270 * XXX On systems that support RTLD_GROUP or DF_1_GROUP, do their 7271 * XXX On systems that support RTLD_GROUP or DF_1_GROUP, do their
7271 * implementations permit similar inconsistencies? Should STV_SINGLETON 7272 * implementations permit similar inconsistencies? Should STV_SINGLETON
7272 * visibility be used for interposition where available? 7273 * visibility be used for interposition where available?
7273 */ 7274 */
7274 # error "Interposing malloc is unsafe on this system without libc malloc hooks. " 7275 # error "Interposing malloc is unsafe on this system without libc malloc hooks. "
7275 #endif 7276 #endif
7276 7277
OLDNEW
« base/allocator/win_allocator.cc ('K') | « base/allocator/win_allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698