zenilib
0.5.3.0
|
#include "SDL_config.h"
#include "SDL_stdinc.h"
#include <errno.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/param.h>
Go to the source code of this file.
Typedefs | |
typedef size_t | bindex_t |
typedef unsigned int | binmap_t |
typedef unsigned int | flag_t |
typedef struct malloc_chunk | mchunk |
typedef struct malloc_chunk * | mchunkptr |
typedef struct malloc_segment | msegment |
typedef struct malloc_segment * | msegmentptr |
typedef struct malloc_state * | mstate |
typedef struct malloc_chunk * | sbinptr |
typedef struct malloc_tree_chunk * | tbinptr |
typedef struct malloc_tree_chunk | tchunk |
typedef struct malloc_tree_chunk * | tchunkptr |
Variables | |
static struct malloc_state | _gm_ |
static int | dev_zero_fd = -1 |
static struct malloc_params | mparams |
#define ABORT |
Definition at line 56 of file SDL_malloc.c.
Referenced by init_mparams().
#define ABORT_ON_ASSERT_FAILURE 1 |
Definition at line 555 of file SDL_malloc.c.
#define ACQUIRE_MAGIC_INIT_LOCK | ( | ) |
Definition at line 1535 of file SDL_malloc.c.
Referenced by init_mparams().
#define ACQUIRE_MORECORE_LOCK | ( | ) |
Definition at line 1527 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
#define align_as_chunk | ( | A | ) | (mchunkptr)((A) + align_offset(chunk2mem(A))) |
Definition at line 1715 of file SDL_malloc.c.
Referenced by internal_mallinfo(), internal_malloc_stats(), prepend_alloc(), and release_unused_segments().
#define align_offset | ( | A | ) |
Definition at line 1332 of file SDL_malloc.c.
Referenced by add_segment(), init_top(), and mmap_alloc().
#define assert | ( | x | ) |
Definition at line 1234 of file SDL_malloc.c.
Referenced by TiXmlAttributeSet::Add(), add_segment(), AddEffectSlotArray(), Zeni::Core::assert_no_error(), TiXmlString::at(), Zeni::Video_GL_Fixed::begin_prerender(), Zeni::Video_GL_Shader::begin_prerender(), Zeni::Video_DX9::begin_prerender(), Zeni::Video_GL_Fixed::begin_render(), Zeni::Video_GL_Shader::begin_render(), Zeni::Video_DX9::begin_render(), Zeni::Image::blit(), DeleteCriticalSection(), dlmalloc(), EnterCriticalSection(), Zeni::Text_Box::erase_lines(), Zeni::Image::extract_Color(), Zeni::Image::extract_RGBA(), face_array_write(), fileio_seek_func(), find_index(), FindShaderType(), TIntermConstantUnion::fold(), free_node_and_childs(), FreeParseContextIndex(), FreePoolIndex(), pp::Token::fValue(), Zeni::Gamestate::Gamestate(), Zeni::Sound_Source_HW::get_buffer(), Zeni::Sound_Source::get_buffer(), Zeni::Matrix4f::get_column(), Zeni::Controllers::get_controller_name(), Zeni::Matrix4f::get_row(), TiXmlBase::GetChar(), TSymbolTable::getDefaultPrecision(), TiXmlBase::GetEntity(), TSymbolTable::getGlobalLevel(), GetGlobalParseContext(), GetGlobalPoolAllocator(), TSymbolTable::getOuterLevel(), Zeni::Console_State::give_function(), ialloc(), IdentifyBuiltIns(), TCompiler::InitBuiltInSymbolTable(), InitializeCriticalSection(), InitializeParseContextIndex(), InitializePoolIndex(), InitProcess(), TiXmlNode::InsertAfterChild(), TiXmlNode::InsertBeforeChild(), internal_memalign(), TiXmlNode::IterateChildren(), pp::Token::iValue(), LeaveCriticalSection(), Zeni::Widgets::lend_Widget(), pp::Preprocessor::lex(), lib3ds_camera_new(), lib3ds_chunk_read(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_file_append_node(), lib3ds_file_camera_by_name(), lib3ds_file_free(), lib3ds_file_insert_camera(), lib3ds_file_insert_light(), lib3ds_file_insert_material(), lib3ds_file_insert_mesh(), lib3ds_file_insert_node(), lib3ds_file_light_by_name(), lib3ds_file_material_by_name(), lib3ds_file_mesh_by_name(), lib3ds_file_node_by_id(), lib3ds_file_node_by_name(), lib3ds_file_remove_camera(), lib3ds_file_remove_light(), lib3ds_file_remove_material(), lib3ds_file_remove_mesh(), lib3ds_file_reserve_cameras(), lib3ds_file_reserve_lights(), lib3ds_file_reserve_materials(), lib3ds_file_reserve_meshes(), lib3ds_io_cleanup(), lib3ds_io_log(), lib3ds_io_log_indent(), lib3ds_io_read(), lib3ds_io_read_byte(), lib3ds_io_read_dword(), lib3ds_io_read_float(), lib3ds_io_read_intb(), lib3ds_io_read_intd(), lib3ds_io_read_intw(), lib3ds_io_read_rgb(), lib3ds_io_read_string(), lib3ds_io_read_vector(), lib3ds_io_read_word(), lib3ds_io_seek(), lib3ds_io_setup(), lib3ds_io_tell(), lib3ds_io_write(), lib3ds_io_write_byte(), lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_intb(), lib3ds_io_write_intd(), lib3ds_io_write_intw(), lib3ds_io_write_string(), lib3ds_io_write_word(), lib3ds_light_new(), lib3ds_material_read(), lib3ds_mesh_calculate_vertex_normals(), lib3ds_mesh_new(), lib3ds_mesh_resize_faces(), lib3ds_mesh_resize_vertices(), lib3ds_node_eval(), lib3ds_node_free(), lib3ds_node_new(), lib3ds_node_new_camera(), lib3ds_node_new_camera_target(), lib3ds_node_new_omnilight(), lib3ds_node_new_spotligf_target(), lib3ds_node_new_spotlight(), lib3ds_node_read(), lib3ds_node_write(), lib3ds_track_eval_bool(), lib3ds_track_eval_float(), lib3ds_track_eval_quat(), lib3ds_track_eval_vector(), lib3ds_track_free(), lib3ds_track_resize(), lib3ds_util_insert_array(), lib3ds_util_remove_array(), lib3ds_util_reserve_array(), TiXmlNode::LinkEndChild(), TiXmlDocument::LoadFile(), main(), pp::Diagnostics::message(), mmap_alloc(), NewPlayer(), Zeni::Text_Box::on_accept(), ConstantUnion::operator%(), ConstantUnion::operator&(), ConstantUnion::operator&&(), ConstantUnion::operator*(), ConstantUnion::operator+(), ConstantUnion::operator-(), ConstantUnion::operator<(), ConstantUnion::operator<<(), ConstantUnion::operator>(), ConstantUnion::operator>>(), Zeni::Matrix4f::Matrix4f_Row::operator[](), Zeni::Color::operator[](), Zeni::Line_Segment< VERTEX >::operator[](), Zeni::Quadrilateral< VERTEX >::operator[](), Zeni::Triangle< VERTEX >::operator[](), Zeni::Matrix4f::operator[](), Zeni::Vector2f::operator[](), Zeni::Quaternion::operator[](), Zeni::Vector3f::operator[](), TiXmlString::operator[](), ConstantUnion::operator^(), ConstantUnion::operator|(), ConstantUnion::operator||(), OS_AllocTLSIndex(), OS_FreeTLSIndex(), OS_SetTLSValue(), pp::ExpressionParser::parse(), TiXmlDocument::Parse(), pos_key_setup(), prefix_name(), prepend_alloc(), TiXmlElement::Print(), TiXmlComment::Print(), TiXmlText::Print(), TiXmlDocument::Print(), PrintActiveVariables(), Zeni::Random::rand_lt(), Zeni::Random::rand_lte(), TiXmlBase::ReadName(), release_unused_segments(), TiXmlAttributeSet::Remove(), TiXmlNode::RemoveChild(), Zeni::Vertex3f_Texture::render_to(), Zeni::Vertex2f_Texture::render_to(), Zeni::Game::replace_Popup_Menu_State_Factory(), Zeni::Game::replace_Popup_Pause_State_Factory(), Resample_copy32_C(), rot_key_setup(), Zeni::Video_GL_Shader::set_alpha_test(), Zeni::Video_GL_Fixed::set_alpha_test(), Zeni::Video_DX9::set_alpha_test(), Zeni::Slider_Int::set_range(), Zeni::Image::set_RGBA(), TiXmlDocument::SetError(), SetGlobalParseContext(), SetGlobalPoolAllocator(), pp::Diagnostics::severity(), Zeni::Slider_Int::Slider_Int(), Zeni::Split_UDP_Socket::Split_UDP_Socket(), TiXmlBase::StringEqual(), timeGetTime(), tmalloc_large(), tmalloc_small(), track_eval_linear(), pp::Token::uValue(), while(), and TiXmlAttributeSet::~TiXmlAttributeSet().
#define bit_for_tree_index | ( | i | ) | (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2) |
Definition at line 2325 of file SDL_malloc.c.
#define CALL_MMAP | ( | s | ) |
Definition at line 1376 of file SDL_malloc.c.
Referenced by sys_alloc().
#define CALL_MORECORE | ( | S | ) | MORECORE(S) |
Definition at line 1436 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
Definition at line 1432 of file SDL_malloc.c.
Referenced by mmap_resize(), and sys_trim().
Definition at line 1361 of file SDL_malloc.c.
Referenced by dlfree(), release_unused_segments(), and sys_trim().
#define calloc SDL_calloc |
Definition at line 636 of file SDL_malloc.c.
Referenced by alcCreateContext(), alGenBuffers(), alGenEffects(), alGenFilters(), allocate_buffer_list(), alsa_open_capture(), alsa_open_playback(), ca_open_capture(), ca_open_playback(), CreateArray(), CreateRingBuffer(), decode_edid(), DSoundOpenCapture(), DSoundOpenPlayback(), face_array_write(), get_device_name(), getAVAudioStream(), lib3ds_camera_new(), lib3ds_file_new(), lib3ds_io_setup(), lib3ds_light_new(), lib3ds_material_new(), lib3ds_mesh_calculate_vertex_normals(), lib3ds_mesh_new(), lib3ds_node_new(), lib3ds_track_new(), main(), MMDevApiOpenPlayback(), NoneCreate(), null_open_playback(), openAVCustom(), openAVData(), openAVFile(), opensl_open_playback(), opensl_start_playback(), oss_open_capture(), oss_open_playback(), oss_start_playback(), pa_open_capture(), pa_open_playback(), ProbeDevices(), ProcessSources(), ReadALConfig(), sndio_open_playback(), sndio_start_playback(), solaris_open_playback(), solaris_start_playback(), ThunkInit(), UpdateDeviceParams(), wave_open_playback(), WinMMOpenCapture(), WinMMOpenPlayback(), WinMMStartPlayback(), and zcalloc().
#define calloc_must_clear | ( | p | ) | (!is_mmapped(p)) |
Definition at line 1787 of file SDL_malloc.c.
Referenced by dlcalloc().
#define check_free_chunk | ( | M, | |
P | |||
) |
Definition at line 2249 of file SDL_malloc.c.
Referenced by dlfree(), and prepend_alloc().
#define check_inuse_chunk | ( | M, | |
P | |||
) |
Definition at line 2250 of file SDL_malloc.c.
Referenced by dlfree(), ialloc(), internal_memalign(), and internal_realloc().
#define check_malloc_state | ( | M | ) |
Definition at line 2253 of file SDL_malloc.c.
Referenced by internal_mallinfo(), and internal_malloc_stats().
#define check_malloced_chunk | ( | M, | |
P, | |||
N | |||
) |
Definition at line 2251 of file SDL_malloc.c.
Referenced by dlmalloc(), prepend_alloc(), and sys_alloc().
#define check_mmapped_chunk | ( | M, | |
P | |||
) |
Definition at line 2252 of file SDL_malloc.c.
Referenced by mmap_alloc(), and mmap_resize().
#define check_top_chunk | ( | M, | |
P | |||
) |
Definition at line 2254 of file SDL_malloc.c.
Referenced by add_segment(), dlmalloc(), prepend_alloc(), sys_alloc(), and sys_trim().
#define chunk2mem | ( | p | ) | ((void*)((char*)(p) + TWO_SIZE_T_SIZES)) |
Definition at line 1712 of file SDL_malloc.c.
Referenced by add_segment(), dlmalloc(), ialloc(), init_top(), internal_memalign(), internal_realloc(), mmap_alloc(), prepend_alloc(), sys_alloc(), tmalloc_large(), and tmalloc_small().
#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE) |
Definition at line 1326 of file SDL_malloc.c.
Referenced by add_segment(), mmap_alloc(), and mmap_resize().
Definition at line 1757 of file SDL_malloc.c.
Referenced by dlfree().
#define CHUNK_OVERHEAD (SIZE_T_SIZE) |
Definition at line 1699 of file SDL_malloc.c.
Referenced by ialloc(), and internal_memalign().
Definition at line 1756 of file SDL_malloc.c.
Referenced by add_segment(), dlfree(), dlmalloc(), ialloc(), init_top(), internal_memalign(), internal_realloc(), mmap_alloc(), mmap_resize(), prepend_alloc(), sys_alloc(), tmalloc_large(), and tmalloc_small().
#define chunksize | ( | p | ) | ((p)->head & ~(INUSE_BITS)) |
Definition at line 1750 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc(), dlmalloc_usable_size(), ialloc(), internal_mallinfo(), internal_malloc_stats(), internal_memalign(), internal_realloc(), mmap_resize(), prepend_alloc(), release_unused_segments(), tmalloc_large(), and tmalloc_small().
#define cinuse | ( | p | ) | ((p)->head & CINUSE_BIT) |
Definition at line 1748 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc_usable_size(), internal_mallinfo(), internal_malloc_stats(), prepend_alloc(), and release_unused_segments().
#define CINUSE_BIT (SIZE_T_TWO) |
Definition at line 1741 of file SDL_malloc.c.
Referenced by internal_memalign(), mmap_alloc(), and mmap_resize().
#define clear_cinuse | ( | p | ) | ((p)->head &= ~CINUSE_BIT) |
Definition at line 1753 of file SDL_malloc.c.
#define clear_pinuse | ( | p | ) | ((p)->head &= ~PINUSE_BIT) |
Definition at line 1752 of file SDL_malloc.c.
Definition at line 2346 of file SDL_malloc.c.
Definition at line 2350 of file SDL_malloc.c.
Definition at line 1347 of file SDL_malloc.c.
Referenced by mmap_alloc(), mmap_resize(), sys_alloc(), and sys_trim().
#define compute_bit2idx | ( | X, | |
I | |||
) |
Definition at line 2368 of file SDL_malloc.c.
Referenced by dlmalloc(), tmalloc_large(), and tmalloc_small().
#define compute_tree_index | ( | S, | |
I | |||
) |
Definition at line 2305 of file SDL_malloc.c.
Referenced by tmalloc_large().
Definition at line 2236 of file SDL_malloc.c.
Referenced by tmalloc_large(), and tmalloc_small().
#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ |
Definition at line 601 of file SDL_malloc.c.
Referenced by init_mparams().
#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) |
Definition at line 615 of file SDL_malloc.c.
Referenced by init_mparams().
#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) |
Definition at line 608 of file SDL_malloc.c.
Referenced by init_mparams().
Definition at line 1382 of file SDL_malloc.c.
Referenced by mmap_alloc().
#define disable_contiguous | ( | M | ) | ((M)->mflags |= USE_NONCONTIGUOUS_BIT) |
Definition at line 2122 of file SDL_malloc.c.
Referenced by sys_alloc().
#define disable_lock | ( | M | ) | ((M)->mflags &= ~USE_LOCK_BIT) |
Definition at line 2115 of file SDL_malloc.c.
#define disable_mmap | ( | M | ) | ((M)->mflags &= ~USE_MMAP_BIT) |
Definition at line 2119 of file SDL_malloc.c.
Referenced by ialloc().
#define dlcalloc calloc |
Definition at line 709 of file SDL_malloc.c.
#define dlfree free |
Definition at line 710 of file SDL_malloc.c.
Referenced by dlrealloc().
#define dlindependent_calloc independent_calloc |
Definition at line 723 of file SDL_malloc.c.
#define dlindependent_comalloc independent_comalloc |
Definition at line 724 of file SDL_malloc.c.
#define dlmallinfo mallinfo |
Definition at line 716 of file SDL_malloc.c.
#define dlmalloc malloc |
Definition at line 711 of file SDL_malloc.c.
Referenced by dlcalloc(), and dlrealloc().
#define dlmalloc_footprint malloc_footprint |
Definition at line 721 of file SDL_malloc.c.
#define dlmalloc_max_footprint malloc_max_footprint |
Definition at line 722 of file SDL_malloc.c.
void dlmalloc_stats malloc_stats |
Definition at line 719 of file SDL_malloc.c.
#define dlmalloc_trim malloc_trim |
Definition at line 718 of file SDL_malloc.c.
#define dlmalloc_usable_size malloc_usable_size |
Definition at line 720 of file SDL_malloc.c.
#define dlmallopt mallopt |
Definition at line 717 of file SDL_malloc.c.
#define dlmemalign memalign |
Definition at line 712 of file SDL_malloc.c.
Referenced by dlpvalloc(), and dlvalloc().
#define dlpvalloc pvalloc |
Definition at line 715 of file SDL_malloc.c.
#define dlrealloc realloc |
Definition at line 713 of file SDL_malloc.c.
#define dlvalloc valloc |
Definition at line 714 of file SDL_malloc.c.
#define enable_lock | ( | M | ) | ((M)->mflags |= USE_LOCK_BIT) |
Definition at line 2114 of file SDL_malloc.c.
#define enable_mmap | ( | M | ) | ((M)->mflags |= USE_MMAP_BIT) |
Definition at line 2118 of file SDL_malloc.c.
Referenced by ialloc().
#define EXTERN_BIT (8U) |
Definition at line 1445 of file SDL_malloc.c.
#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE) |
Definition at line 1745 of file SDL_malloc.c.
Referenced by add_segment(), internal_mallinfo(), internal_malloc_stats(), mmap_alloc(), and mmap_resize().
#define FOOTERS 0 |
Definition at line 549 of file SDL_malloc.c.
#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2) |
Definition at line 1321 of file SDL_malloc.c.
Referenced by add_segment().
#define free SDL_free |
Definition at line 638 of file SDL_malloc.c.
Referenced by qsort_aligned(), qsort_nonaligned(), and qsort_words().
Definition at line 1767 of file SDL_malloc.c.
#define gm (&_gm_) |
Definition at line 2105 of file SDL_malloc.c.
Referenced by dlindependent_calloc(), dlindependent_comalloc(), dlmallinfo(), dlmalloc(), dlmalloc_footprint(), dlmalloc_max_footprint(), dlmalloc_trim(), dlmemalign(), dlrealloc(), and init_mparams().
#define granularity_align | ( | S | ) | (((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE)) |
Definition at line 2134 of file SDL_malloc.c.
Referenced by mmap_alloc(), mmap_resize(), and sys_alloc().
#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U) |
Definition at line 1323 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
#define HAVE_MMAP 1 |
Definition at line 567 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
#define HAVE_MORECORE 1 |
Definition at line 586 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
#define HAVE_MREMAP 0 |
Definition at line 576 of file SDL_malloc.c.
Definition at line 2342 of file SDL_malloc.c.
Referenced by dlmalloc(), and tmalloc_large().
#define INITIAL_LOCK | ( | l | ) |
Definition at line 1520 of file SDL_malloc.c.
Referenced by init_mparams().
#define INSECURE 0 |
Definition at line 564 of file SDL_malloc.c.
#define insert_chunk | ( | M, | |
P, | |||
S | |||
) |
Definition at line 3197 of file SDL_malloc.c.
Referenced by add_segment(), dlfree(), prepend_alloc(), and tmalloc_large().
#define insert_large_chunk | ( | M, | |
X, | |||
S | |||
) |
Definition at line 3056 of file SDL_malloc.c.
Referenced by release_unused_segments().
#define insert_small_chunk | ( | M, | |
P, | |||
S | |||
) |
Definition at line 2985 of file SDL_malloc.c.
Definition at line 3219 of file SDL_malloc.c.
Referenced by internal_memalign(), and internal_realloc().
Definition at line 3218 of file SDL_malloc.c.
Referenced by ialloc(), internal_memalign(), and internal_realloc().
#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT) |
Definition at line 1742 of file SDL_malloc.c.
Referenced by dlfree().
#define is_aligned | ( | A | ) | (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0) |
Definition at line 1329 of file SDL_malloc.c.
Referenced by add_segment(), and mmap_alloc().
#define is_extern_segment | ( | S | ) | ((S)->sflags & EXTERN_BIT) |
Definition at line 1969 of file SDL_malloc.c.
Referenced by release_unused_segments(), sys_alloc(), and sys_trim().
#define is_global | ( | M | ) | ((M) == &_gm_) |
Definition at line 2106 of file SDL_malloc.c.
Referenced by sys_alloc().
#define is_granularity_aligned | ( | S | ) | (((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0) |
Definition at line 2139 of file SDL_malloc.c.
#define is_initialized | ( | M | ) | ((M)->top != 0) |
Definition at line 2107 of file SDL_malloc.c.
Referenced by internal_mallinfo(), internal_malloc_stats(), sys_alloc(), and sys_trim().
#define is_mmapped | ( | p | ) | (!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_MMAPPED_BIT)) |
Definition at line 1778 of file SDL_malloc.c.
Referenced by ialloc(), internal_memalign(), and internal_realloc().
#define IS_MMAPPED_BIT (SIZE_T_ONE) |
Definition at line 1357 of file SDL_malloc.c.
Referenced by dlfree(), mmap_alloc(), mmap_resize(), and sys_alloc().
#define is_mmapped_segment | ( | S | ) | ((S)->sflags & IS_MMAPPED_BIT) |
Definition at line 1968 of file SDL_malloc.c.
Referenced by release_unused_segments(), and sys_trim().
#define is_page_aligned | ( | S | ) | (((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0) |
Definition at line 2137 of file SDL_malloc.c.
Referenced by sys_alloc().
#define is_small | ( | s | ) | (((s) >> SMALLBIN_SHIFT) < NSMALLBINS) |
Definition at line 2280 of file SDL_malloc.c.
Referenced by mmap_resize().
#define LACKS_STDIO_H |
Definition at line 52 of file SDL_malloc.c.
#define LACKS_STDLIB_H |
Definition at line 55 of file SDL_malloc.c.
#define LACKS_STRING_H |
Definition at line 54 of file SDL_malloc.c.
#define LACKS_STRINGS_H |
Definition at line 53 of file SDL_malloc.c.
#define LACKS_SYS_TYPES_H |
Definition at line 51 of file SDL_malloc.c.
Definition at line 2383 of file SDL_malloc.c.
Referenced by dlmalloc(), tmalloc_large(), and tmalloc_small().
Definition at line 2386 of file SDL_malloc.c.
Referenced by dlmalloc(), and tmalloc_large().
Definition at line 1901 of file SDL_malloc.c.
Referenced by tmalloc_large(), and tmalloc_small().
#define leftshift_for_tree_index | ( | i | ) |
#define M_GRANULARITY (-2) |
Definition at line 648 of file SDL_malloc.c.
Referenced by change_mparam().
#define M_MMAP_THRESHOLD (-3) |
Definition at line 649 of file SDL_malloc.c.
Referenced by change_mparam().
#define M_TRIM_THRESHOLD (-1) |
Definition at line 647 of file SDL_malloc.c.
Referenced by change_mparam().
#define MALLINFO_FIELD_TYPE size_t |
Definition at line 630 of file SDL_malloc.c.
#define malloc SDL_malloc |
Definition at line 635 of file SDL_malloc.c.
Referenced by al_malloc(), alcCreateContext(), allocate_buffer_list(), alsa_open_capture(), alsa_start_playback(), alSourceQueueBuffers(), ca_open_capture(), DedicatedCreate(), SDL_BWin::DirectConnected(), EchoCreate(), engine_handle_cmd(), gz_error(), gz_head(), gz_init(), gz_open(), gzdopen(), kfdata_read(), lib3ds_mesh_calculate_vertex_normals(), LoadHrtf00(), LoadHrtf01(), ModulatorCreate(), names_add(), NewPlayer(), OpenPlayerFile(), PNG_FUNCTION(), ppalloc(), probe_devices(), ReverbCreate(), SDL_CreateSemaphore(), SDLNet_AllocPacket(), SDLNet_AllocPacketV(), SDLNet_AllocSocketSet(), SDLNet_GetLocalAddresses(), SDLNet_ResizePacket(), SDLNet_TCP_Accept(), SDLNet_TCP_Open(), SDLNet_UDP_Open(), SetSourceiv(), StartThread(), TMMap::TMMap(), wave_start_playback(), yyalloc(), and zcalloc().
#define MALLOC_ALIGNMENT ((size_t)8U) |
Definition at line 546 of file SDL_malloc.c.
Referenced by init_mparams(), internal_memalign(), and sys_alloc().
#define MALLOC_FAILURE_ACTION errno = ENOMEM; |
Definition at line 580 of file SDL_malloc.c.
Referenced by internal_memalign(), internal_realloc(), and sys_alloc().
#define malloc_getpagesize ((size_t)4096U) |
Definition at line 1298 of file SDL_malloc.c.
Referenced by init_mparams().
Definition at line 2460 of file SDL_malloc.c.
Referenced by mmap_alloc(), and mmap_resize().
Definition at line 2345 of file SDL_malloc.c.
Definition at line 2349 of file SDL_malloc.c.
#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2) |
Definition at line 1718 of file SDL_malloc.c.
Referenced by dlmalloc(), internal_memalign(), internal_realloc(), and sys_trim().
#define MAX_SIZE_T (~(size_t)0) |
Definition at line 533 of file SDL_malloc.c.
Referenced by dlcalloc(), dlmalloc(), init_mparams(), and sys_trim().
#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD) |
Definition at line 2057 of file SDL_malloc.c.
Referenced by dlmalloc().
#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE) |
Definition at line 2056 of file SDL_malloc.c.
Definition at line 1694 of file SDL_malloc.c.
Referenced by init_mparams().
#define mem2chunk | ( | mem | ) | ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES)) |
Definition at line 1713 of file SDL_malloc.c.
Referenced by dlcalloc(), dlfree(), dlmalloc_usable_size(), dlrealloc(), ialloc(), internal_memalign(), internal_realloc(), and sys_alloc().
#define memcpy SDL_memcpy |
Definition at line 634 of file SDL_malloc.c.
Referenced by _ov_getlap(), _ov_open1(), _vp_couple_quantize_normalize(), _vqgen_seed(), AppendList(), TiXmlString::assign(), Zeni::Image::blit(), build_tree_from_lengths(), Convert_ALima4_ALima4(), decodeAVAudioStream(), SDL_BWin::DirectConnected(), gz_head(), gzgets(), gzread(), gzwrite(), HandleClient(), HandleServerData(), InitializeEffect(), internal_realloc(), launch(), lib3ds_matrix_copy(), lib3ds_matrix_mult(), local_book_besterror(), MemData_read(), MemData_write(), Modern_State::Modern_State(), names_add(), names_dump(), ogg_stream_flush_i(), ogg_stream_iovecin(), ogg_stream_pagein(), ogg_sync_pageseek(), Zeni::Game::on_event(), pp::Input::read(), readAVAudioData(), ReadRingBuffer(), Zeni::Split_UDP_Socket::receive(), Resample_copy32_C(), TiXmlString::reserve(), SDL_memcpy(), SDLNet_ResolveHost(), Zeni::Split_UDP_Socket::send(), SendBuf(), SendHello(), SendNew(), setup_tone_curves(), string_input(), TiXmlString::TiXmlString(), Zeni::unserialize(), Zeni::Vertex_Buffer_Renderer_DX9::Vertex_Buffer_Renderer_DX9(), Zeni::Vertex_Buffer_Renderer_GL_Fixed::Vertex_Buffer_Renderer_GL_Fixed(), Zeni::Vertex_Buffer_Renderer_GL_Shader::Vertex_Buffer_Renderer_GL_Shader(), vorbis_analysis_blockout(), vorbis_analysis_headerout(), vorbis_commentheader_out(), vorbis_encode_floor_setup(), vorbis_encode_global_psych_setup(), vorbis_encode_global_stereo(), vorbis_encode_map_n_res_setup(), vorbis_encode_psyset_setup(), vorbis_encode_residue_setup(), vqgen_addpoint(), vqgen_sortmesh(), WriteRingBuffer(), and zenilib_main().
#define memset SDL_memset |
Definition at line 633 of file SDL_malloc.c.
Referenced by _01class(), _01forward(), _2class(), _get_prev_page(), _make_words(), _ov_getlap(), _ov_open1(), _vds_shared_init(), _ve_envelope_clear(), _ve_envelope_search(), _vi_gpsy_free(), _vi_psy_free(), _vorbis_block_ripcord(), _vp_couple_quantize_normalize(), _vp_global_free(), _vp_psy_clear(), _vp_psy_init(), accumulate_fit(), al_calloc(), alc_deinit(), alDeleteAuxiliaryEffectSlots(), alDeleteBuffers(), alDeleteEffects(), alDeleteFilters(), alDeleteSources(), alGenBuffers(), alGenEffects(), alGenFilters(), alGenSources(), alsa_capture_samples(), aluMixData(), android_main(), bs2b_clear(), DeletePlayer(), dlcalloc(), drft_clear(), DSoundOpenCapture(), DSoundPlaybackProc(), DSoundResetPlayback(), floor0_free_info(), floor0_free_look(), floor0_inverse2(), floor1_encode(), floor1_free_info(), floor1_free_look(), floor1_inverse2(), FreeContext(), getAVAudioData(), gz_zero(), ialloc(), InitializeEffect(), launch(), lib3ds_camera_free(), lib3ds_file_open(), lib3ds_file_read(), lib3ds_file_save(), lib3ds_file_write(), lib3ds_light_free(), lib3ds_material_free(), lib3ds_mesh_free(), lib3ds_track_free(), lib3ds_track_resize(), lib3ds_util_realloc_array(), lib3ds_viewport_read(), main(), MakeExtensible(), mapping0_forward(), mapping0_free_info(), mapping0_inverse(), mapping0_unpack(), Zeni::Matrix4f::Matrix4f(), mdct_clear(), Modern_State::Modern_State(), NewPlayer(), NewThunkEntry(), ogg_packet_clear(), ogg_stream_clear(), ogg_stream_init(), ogg_sync_clear(), ogg_sync_init(), ogg_sync_pageseek(), oggpack_readinit(), oggpack_writeclear(), oggpack_writeinit(), ov_clear(), ppensure_buffer_stack(), pplex_init(), pplex_init_extra(), PSPAUD_OpenDevice(), ReleaseALAuxiliaryEffectSlots(), ReleaseALBuffers(), ReleaseALEffects(), ReleaseALFilters(), ReleaseALSources(), res0_free_info(), res0_free_look(), SDL_memset(), SDLNet_TCP_Open(), SDLNet_UDP_Open(), setup_tone_curves(), TAllocation::TAllocation(), Zeni::Vertex_Buffer_Renderer_DX9::Vertex_Buffer_Renderer_DX9(), Zeni::Vertex_Buffer_Renderer_GL_Fixed::Vertex_Buffer_Renderer_GL_Fixed(), Zeni::Vertex_Buffer_Renderer_GL_Shader::Vertex_Buffer_Renderer_GL_Shader(), ValidateLimitations::visitLoop(), vorbis_analysis_headerout(), vorbis_analysis_wrote(), vorbis_bitrate_clear(), vorbis_bitrate_init(), vorbis_block_clear(), vorbis_block_init(), vorbis_book_clear(), vorbis_book_init_decode(), vorbis_book_init_encode(), vorbis_comment_clear(), vorbis_comment_init(), vorbis_dsp_clear(), vorbis_info_clear(), vorbis_info_init(), vorbis_lpc_from_data(), vorbis_staticbook_destroy(), vorbis_synthesis_headerin(), vorbis_synthesis_idheader(), vqgen_init(), vqgen_iterate(), Zeni::Window::Window(), WinMMOpenCapture(), WinMMOpenPlayback(), WinMMStartPlayback(), yyensure_buffer_stack(), yylex_init(), and yylex_init_extra().
#define MFAIL ((void*)(MAX_SIZE_T)) |
Definition at line 1346 of file SDL_malloc.c.
Referenced by sys_trim().
#define MIN_CHUNK_SIZE ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) |
Definition at line 1708 of file SDL_malloc.c.
Referenced by add_segment(), dlmalloc(), init_mparams(), internal_memalign(), internal_realloc(), prepend_alloc(), tmalloc_large(), and tmalloc_small().
#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT) |
Definition at line 2055 of file SDL_malloc.c.
#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE) |
Definition at line 1719 of file SDL_malloc.c.
Referenced by dlmalloc().
#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE)) |
Definition at line 2283 of file SDL_malloc.c.
#define minsize_for_tree_index | ( | i | ) |
Definition at line 2334 of file SDL_malloc.c.
#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) |
Definition at line 1703 of file SDL_malloc.c.
#define MMAP_CLEARS 1 |
Definition at line 570 of file SDL_malloc.c.
#define MMAP_FLAGS (MAP_PRIVATE) |
Definition at line 1374 of file SDL_malloc.c.
#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES) |
Definition at line 1705 of file SDL_malloc.c.
Referenced by dlfree(), mmap_alloc(), and mmap_resize().
#define MMAP_PROT (PROT_READ|PROT_WRITE) |
Definition at line 1362 of file SDL_malloc.c.
#define MORECORE sbrk |
Definition at line 593 of file SDL_malloc.c.
#define MORECORE_CONTIGUOUS 1 |
Definition at line 596 of file SDL_malloc.c.
Referenced by sys_alloc().
#define MSPACES 0 |
Definition at line 542 of file SDL_malloc.c.
Definition at line 1760 of file SDL_malloc.c.
Referenced by internal_mallinfo(), internal_malloc_stats(), and sys_alloc().
#define next_pinuse | ( | p | ) | ((next_chunk(p)->head) & PINUSE_BIT) |
Definition at line 1764 of file SDL_malloc.c.
#define NO_MALLINFO 0 |
Definition at line 627 of file SDL_malloc.c.
#define NSMALLBINS (32U) |
Definition at line 2050 of file SDL_malloc.c.
Referenced by init_bins().
#define NTREEBINS (32U) |
Definition at line 2051 of file SDL_malloc.c.
Definition at line 2422 of file SDL_malloc.c.
Referenced by dlfree(), internal_realloc(), tmalloc_large(), and tmalloc_small().
Definition at line 2426 of file SDL_malloc.c.
Referenced by dlfree(), and internal_realloc().
#define ok_magic | ( | M | ) | (1) |
Definition at line 2441 of file SDL_malloc.c.
Referenced by dlfree(), and dlrealloc().
Definition at line 2424 of file SDL_malloc.c.
Referenced by dlfree(), internal_realloc(), tmalloc_large(), and tmalloc_small().
Definition at line 2428 of file SDL_malloc.c.
Referenced by dlfree(), and internal_realloc().
#define ONLY_MSPACES 0 |
Definition at line 536 of file SDL_malloc.c.
#define overhead_for | ( | p | ) | (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD) |
Definition at line 1782 of file SDL_malloc.c.
Referenced by dlmalloc_usable_size(), and internal_realloc().
#define pad_request | ( | req | ) | (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) |
Definition at line 1722 of file SDL_malloc.c.
Referenced by add_segment(), and dlmalloc().
#define page_align | ( | S | ) | (((S) + (mparams.page_size)) & ~(mparams.page_size - SIZE_T_ONE)) |
Definition at line 2130 of file SDL_malloc.c.
Referenced by sys_alloc().
#define pinuse | ( | p | ) | ((p)->head & PINUSE_BIT) |
Definition at line 1749 of file SDL_malloc.c.
Referenced by dlfree(), and prepend_alloc().
#define PINUSE_BIT (SIZE_T_ONE) |
Definition at line 1740 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc(), init_top(), internal_realloc(), prepend_alloc(), and sys_alloc().
#define POSTACTION | ( | M | ) |
Definition at line 2209 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc(), dlmalloc_trim(), ialloc(), internal_mallinfo(), internal_malloc_stats(), internal_memalign(), and internal_realloc().
#define PREACTION | ( | M | ) | (0) |
Definition at line 2205 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc(), dlmalloc_trim(), ialloc(), internal_mallinfo(), internal_malloc_stats(), internal_memalign(), and internal_realloc().
Definition at line 1761 of file SDL_malloc.c.
#define PROCEED_ON_ERROR 0 |
Definition at line 558 of file SDL_malloc.c.
#define realloc SDL_realloc |
Definition at line 637 of file SDL_malloc.c.
Referenced by AddEffectSlotArray(), AllocLines(), alsa_stop_capture(), alSourcePlayv(), AppendList(), decodeAVAudioStream(), DSoundEnumCaptureDevices(), DSoundEnumPlaybackDevices(), EchoDeviceUpdate(), FindFonts(), getAVAudioStream(), InsertUIntMapEntry(), lib3ds_track_resize(), lib3ds_util_realloc_array(), lib3ds_util_reserve_array(), LoadConfigFromFile(), LoadData(), main(), names_add(), NewThunkEntry(), pprealloc(), probe_devices(), ProbeCaptureDevices(), ProbePlaybackDevices(), SDLNet_GetLocalAddresses(), and yyrealloc().
#define RELEASE_MAGIC_INIT_LOCK | ( | ) |
Definition at line 1536 of file SDL_malloc.c.
Referenced by init_mparams().
#define RELEASE_MORECORE_LOCK | ( | ) |
Definition at line 1528 of file SDL_malloc.c.
Referenced by sys_alloc(), and sys_trim().
#define replace_dv | ( | M, | |
P, | |||
S | |||
) |
Definition at line 3042 of file SDL_malloc.c.
Referenced by dlmalloc(), and tmalloc_small().
#define request2size | ( | req | ) | (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req)) |
Definition at line 1726 of file SDL_malloc.c.
Referenced by ialloc(), internal_memalign(), and internal_realloc().
Definition at line 2450 of file SDL_malloc.c.
Referenced by dlfree(), internal_realloc(), tmalloc_large(), and tmalloc_small().
Definition at line 2389 of file SDL_malloc.c.
#define segment_holds | ( | S, | |
A | |||
) | ((char*)(A) >= S->base && (char*)(A) < S->base + S->size) |
Definition at line 2143 of file SDL_malloc.c.
Referenced by internal_mallinfo(), internal_malloc_stats(), release_unused_segments(), and sys_alloc().
Definition at line 1768 of file SDL_malloc.c.
#define set_free_with_pinuse | ( | p, | |
s, | |||
n | |||
) | (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s)) |
Definition at line 1775 of file SDL_malloc.c.
Referenced by add_segment(), dlfree(), and prepend_alloc().
Definition at line 2463 of file SDL_malloc.c.
Referenced by internal_memalign(), and internal_realloc().
Definition at line 2468 of file SDL_malloc.c.
Referenced by dlmalloc(), tmalloc_large(), and tmalloc_small().
#define set_lock | ( | M, | |
L | |||
) |
Definition at line 2124 of file SDL_malloc.c.
Definition at line 1771 of file SDL_malloc.c.
Referenced by dlfree(), dlmalloc(), prepend_alloc(), tmalloc_large(), and tmalloc_small().
#define set_size_and_pinuse_of_inuse_chunk | ( | M, | |
p, | |||
s | |||
) | ((p)->head = (s|PINUSE_BIT|CINUSE_BIT)) |
Definition at line 2473 of file SDL_malloc.c.
Referenced by add_segment(), dlmalloc(), ialloc(), prepend_alloc(), sys_alloc(), tmalloc_large(), and tmalloc_small().
Definition at line 2173 of file SDL_malloc.c.
Referenced by dlfree().
#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES) |
Definition at line 1322 of file SDL_malloc.c.
Referenced by mmap_alloc(), and mmap_resize().
Definition at line 1313 of file SDL_malloc.c.
Referenced by tmalloc_large().
#define SIZE_T_ONE ((size_t)1) |
Definition at line 1318 of file SDL_malloc.c.
Referenced by dlpvalloc(), init_mparams(), internal_mallinfo(), internal_memalign(), sys_alloc(), sys_trim(), and tmalloc_large().
Definition at line 1312 of file SDL_malloc.c.
Referenced by add_segment(), dlmalloc(), ialloc(), mmap_alloc(), and mmap_resize().
#define SIZE_T_TWO ((size_t)2) |
Definition at line 1319 of file SDL_malloc.c.
#define SIZE_T_ZERO ((size_t)0) |
Definition at line 1317 of file SDL_malloc.c.
#define small_index | ( | s | ) | ((s) >> SMALLBIN_SHIFT) |
Definition at line 2281 of file SDL_malloc.c.
Referenced by dlmalloc().
#define small_index2size | ( | i | ) | ((i) << SMALLBIN_SHIFT) |
Definition at line 2282 of file SDL_malloc.c.
Referenced by dlmalloc().
Definition at line 2286 of file SDL_malloc.c.
Referenced by dlmalloc(), and init_bins().
#define SMALLBIN_SHIFT (3U) |
Definition at line 2052 of file SDL_malloc.c.
#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT) |
Definition at line 2053 of file SDL_malloc.c.
Definition at line 2347 of file SDL_malloc.c.
#define TOP_FOOT_SIZE (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE) |
Definition at line 2183 of file SDL_malloc.c.
Referenced by add_segment(), init_top(), internal_mallinfo(), internal_malloc_stats(), release_unused_segments(), sys_alloc(), and sys_trim().
Definition at line 2287 of file SDL_malloc.c.
Referenced by tmalloc_large(), and tmalloc_small().
#define TREEBIN_SHIFT (8U) |
Definition at line 2054 of file SDL_malloc.c.
Definition at line 2351 of file SDL_malloc.c.
#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1) |
Definition at line 1320 of file SDL_malloc.c.
#define unlink_chunk | ( | M, | |
P, | |||
S | |||
) |
#define unlink_first_small_chunk | ( | M, | |
B, | |||
P, | |||
I | |||
) |
Definition at line 3024 of file SDL_malloc.c.
Referenced by dlmalloc().
#define unlink_large_chunk | ( | M, | |
X | |||
) |
Definition at line 3124 of file SDL_malloc.c.
Referenced by release_unused_segments(), tmalloc_large(), and tmalloc_small().
#define unlink_small_chunk | ( | M, | |
P, | |||
S | |||
) |
Definition at line 3004 of file SDL_malloc.c.
Definition at line 2240 of file SDL_malloc.c.
Referenced by dlfree(), dlrealloc(), and internal_realloc().
#define USE_BUILTIN_FFS 0 |
Definition at line 621 of file SDL_malloc.c.
#define USE_DEV_RANDOM 0 |
Definition at line 624 of file SDL_malloc.c.
#define use_lock | ( | M | ) | ((M)->mflags & USE_LOCK_BIT) |
Definition at line 2113 of file SDL_malloc.c.
#define USE_LOCK_BIT (0U) |
Definition at line 1519 of file SDL_malloc.c.
Referenced by init_mparams().
#define USE_LOCKS 0 |
Definition at line 561 of file SDL_malloc.c.
#define use_mmap | ( | M | ) | ((M)->mflags & USE_MMAP_BIT) |
Definition at line 2117 of file SDL_malloc.c.
Referenced by ialloc(), and sys_alloc().
#define USE_MMAP_BIT (SIZE_T_ONE) |
Definition at line 1358 of file SDL_malloc.c.
Referenced by init_mparams().
#define use_noncontiguous | ( | M | ) | ((M)->mflags & USE_NONCONTIGUOUS_BIT) |
Definition at line 2121 of file SDL_malloc.c.
Referenced by sys_alloc().
#define USE_NONCONTIGUOUS_BIT (4U) |
Definition at line 1442 of file SDL_malloc.c.
Referenced by init_mparams().
Definition at line 1688 of file SDL_malloc.c.
Definition at line 1689 of file SDL_malloc.c.
Definition at line 1690 of file SDL_malloc.c.
typedef struct malloc_chunk mchunk |
Definition at line 1685 of file SDL_malloc.c.
typedef struct malloc_chunk* mchunkptr |
Definition at line 1686 of file SDL_malloc.c.
typedef struct malloc_segment msegment |
Definition at line 1971 of file SDL_malloc.c.
typedef struct malloc_segment* msegmentptr |
Definition at line 1972 of file SDL_malloc.c.
typedef struct malloc_state* mstate |
Definition at line 2081 of file SDL_malloc.c.
typedef struct malloc_chunk* sbinptr |
Definition at line 1687 of file SDL_malloc.c.
typedef struct malloc_tree_chunk* tbinptr |
Definition at line 1898 of file SDL_malloc.c.
typedef struct malloc_tree_chunk tchunk |
Definition at line 1896 of file SDL_malloc.c.
typedef struct malloc_tree_chunk* tchunkptr |
Definition at line 1897 of file SDL_malloc.c.
Definition at line 3398 of file SDL_malloc.c.
References align_offset, assert, check_top_chunk, chunk2mem, CHUNK_ALIGN_MASK, chunk_plus_offset, FENCEPOST_HEAD, FOUR_SIZE_T_SIZES, init_top(), insert_chunk, is_aligned, MIN_CHUNK_SIZE, pad_request, segment_holding(), set_free_with_pinuse, set_size_and_pinuse_of_inuse_chunk, SIZE_T_SIZE, and TOP_FOOT_SIZE.
Referenced by sys_alloc().
Definition at line 2584 of file SDL_malloc.c.
References init_mparams(), M_GRANULARITY, M_MMAP_THRESHOLD, M_TRIM_THRESHOLD, and mparams.
Referenced by dlmallopt().
Definition at line 4396 of file SDL_malloc.c.
References calloc_must_clear, dlmalloc, MAX_SIZE_T, mem2chunk, and memset.
Definition at line 4299 of file SDL_malloc.c.
References CALL_MUNMAP, check_free_chunk, check_inuse_chunk, chunk_minus_offset, chunk_plus_offset, chunksize, cinuse, fm, insert_chunk, INUSE_BITS, IS_MMAPPED_BIT, mem2chunk, MMAP_FOOT_PAD, ok_address, ok_cinuse, ok_magic, ok_next, ok_pinuse, pinuse, PINUSE_BIT, POSTACTION, PREACTION, RTCHECK, set_free_with_pinuse, set_size_and_pinuse_of_free_chunk, should_trim, sys_trim(), unlink_chunk, and USAGE_ERROR_ACTION.
Definition at line 4444 of file SDL_malloc.c.
Definition at line 4451 of file SDL_malloc.c.
struct mallinfo dlmallinfo | ( | void | ) |
Definition at line 4500 of file SDL_malloc.c.
References gm, and internal_mallinfo().
Definition at line 4165 of file SDL_malloc.c.
References assert, check_malloced_chunk, check_top_chunk, chunk2mem, chunk_plus_offset, chunksize, compute_bit2idx, gm, i, idx, idx2bit, least_bit, left_bits, MAX_REQUEST, MAX_SIZE_T, MAX_SMALL_REQUEST, MIN_CHUNK_SIZE, MIN_REQUEST, pad_request, PINUSE_BIT, POSTACTION, PREACTION, replace_dv, set_inuse_and_pinuse, set_size_and_pinuse_of_free_chunk, set_size_and_pinuse_of_inuse_chunk, SIZE_T_SIZE, small_index, small_index2size, smallbin_at, sys_alloc(), tmalloc_large(), tmalloc_small(), and unlink_first_small_chunk.
Definition at line 4487 of file SDL_malloc.c.
References gm.
Definition at line 4493 of file SDL_malloc.c.
References gm.
Definition at line 4476 of file SDL_malloc.c.
References gm, POSTACTION, PREACTION, and sys_trim().
Definition at line 4513 of file SDL_malloc.c.
References chunksize, cinuse, mem2chunk, and overhead_for.
Definition at line 4524 of file SDL_malloc.c.
References change_mparam().
Definition at line 4438 of file SDL_malloc.c.
References gm, and internal_memalign().
Definition at line 4466 of file SDL_malloc.c.
References dlmemalign, init_mparams(), mparams, and SIZE_T_ONE.
Definition at line 4413 of file SDL_malloc.c.
References dlfree, dlmalloc, gm, internal_realloc(), mem2chunk, ok_magic, and USAGE_ERROR_ACTION.
Definition at line 4457 of file SDL_malloc.c.
References dlmemalign, init_mparams(), and mparams.
|
static |
Definition at line 2161 of file SDL_malloc.c.
Referenced by sys_trim().
|
static |
Definition at line 4039 of file SDL_malloc.c.
References assert, check_inuse_chunk, chunk2mem, CHUNK_OVERHEAD, chunk_plus_offset, chunksize, disable_mmap, enable_mmap, i, internal_malloc, is_mmapped, mem2chunk, memset, POSTACTION, PREACTION, request2size, set_size_and_pinuse_of_inuse_chunk, SIZE_T_SIZE, and use_mmap.
Referenced by dlindependent_calloc(), and dlindependent_comalloc().
Definition at line 3323 of file SDL_malloc.c.
References i, NSMALLBINS, and smallbin_at.
Referenced by sys_alloc().
Definition at line 2506 of file SDL_malloc.c.
References ABORT, ACQUIRE_MAGIC_INIT_LOCK, DEFAULT_GRANULARITY, DEFAULT_MMAP_THRESHOLD, DEFAULT_TRIM_THRESHOLD, gm, INITIAL_LOCK, MALLOC_ALIGNMENT, malloc_getpagesize, MAX_SIZE_T, MCHUNK_SIZE, MIN_CHUNK_SIZE, mparams, RELEASE_MAGIC_INIT_LOCK, SIZE_T_ONE, USE_LOCK_BIT, USE_MMAP_BIT, and USE_NONCONTIGUOUS_BIT.
Referenced by change_mparam(), dlpvalloc(), dlvalloc(), and sys_alloc().
Definition at line 3306 of file SDL_malloc.c.
References align_offset, chunk2mem, chunk_plus_offset, mparams, PINUSE_BIT, and TOP_FOOT_SIZE.
Referenced by add_segment(), sys_alloc(), and sys_trim().
|
static |
Definition at line 2899 of file SDL_malloc.c.
References align_as_chunk, check_malloc_state, chunksize, cinuse, FENCEPOST_HEAD, is_initialized, next_chunk, POSTACTION, PREACTION, segment_holds, SIZE_T_ONE, and TOP_FOOT_SIZE.
Referenced by dlmallinfo().
Definition at line 2940 of file SDL_malloc.c.
References align_as_chunk, check_malloc_state, chunksize, cinuse, FENCEPOST_HEAD, is_initialized, next_chunk, POSTACTION, PREACTION, segment_holds, and TOP_FOOT_SIZE.
Definition at line 3949 of file SDL_malloc.c.
References assert, check_inuse_chunk, chunk2mem, CHUNK_OVERHEAD, chunk_plus_offset, chunksize, CINUSE_BIT, internal_free, internal_malloc, is_mmapped, MALLOC_ALIGNMENT, MALLOC_FAILURE_ACTION, MAX_REQUEST, mem2chunk, MIN_CHUNK_SIZE, POSTACTION, PREACTION, request2size, set_inuse, and SIZE_T_ONE.
Referenced by dlmemalign().
Definition at line 3879 of file SDL_malloc.c.
References check_inuse_chunk, chunk2mem, chunk_plus_offset, chunksize, internal_free, internal_malloc, is_mmapped, MALLOC_FAILURE_ACTION, MAX_REQUEST, mem2chunk, memcpy, MIN_CHUNK_SIZE, mmap_resize(), ok_address, ok_cinuse, ok_next, ok_pinuse, overhead_for, PINUSE_BIT, POSTACTION, PREACTION, request2size, RTCHECK, set_inuse, and USAGE_ERROR_ACTION.
Referenced by dlrealloc().
Definition at line 3237 of file SDL_malloc.c.
References align_offset, assert, check_mmapped_chunk, chunk2mem, CHUNK_ALIGN_MASK, chunk_plus_offset, CINUSE_BIT, CMFAIL, DIRECT_MMAP, FENCEPOST_HEAD, granularity_align, is_aligned, IS_MMAPPED_BIT, mark_inuse_foot, MMAP_FOOT_PAD, SIX_SIZE_T_SIZES, and SIZE_T_SIZE.
Referenced by sys_alloc().
Definition at line 3267 of file SDL_malloc.c.
References CALL_MREMAP, check_mmapped_chunk, CHUNK_ALIGN_MASK, chunk_plus_offset, chunksize, CINUSE_BIT, CMFAIL, cp, FENCEPOST_HEAD, granularity_align, IS_MMAPPED_BIT, is_small, mark_inuse_foot, MMAP_FOOT_PAD, mparams, SIX_SIZE_T_SIZES, and SIZE_T_SIZE.
Referenced by internal_realloc().
Definition at line 3356 of file SDL_malloc.c.
References align_as_chunk, assert, check_free_chunk, check_malloced_chunk, check_top_chunk, chunk2mem, chunk_plus_offset, chunksize, cinuse, insert_chunk, MIN_CHUNK_SIZE, pinuse, PINUSE_BIT, set_free_with_pinuse, set_size_and_pinuse_of_free_chunk, set_size_and_pinuse_of_inuse_chunk, and unlink_chunk.
Referenced by sys_alloc().
Definition at line 3655 of file SDL_malloc.c.
References align_as_chunk, assert, CALL_MUNMAP, chunksize, cinuse, insert_large_chunk, is_extern_segment, is_mmapped_segment, segment_holds, TOP_FOOT_SIZE, and unlink_large_chunk.
Referenced by sys_trim().
|
static |
Definition at line 2148 of file SDL_malloc.c.
Referenced by add_segment(), sys_alloc(), and sys_trim().
Definition at line 3455 of file SDL_malloc.c.
References ACQUIRE_MORECORE_LOCK, add_segment(), CALL_MMAP, CALL_MORECORE, check_malloced_chunk, check_top_chunk, chunk2mem, chunk_plus_offset, CMFAIL, disable_contiguous, granularity_align, HALF_MAX_SIZE_T, HAVE_MMAP, HAVE_MORECORE, init_bins(), init_mparams(), init_top(), is_extern_segment, is_global, is_initialized, IS_MMAPPED_BIT, is_page_aligned, MALLOC_ALIGNMENT, MALLOC_FAILURE_ACTION, mem2chunk, mmap_alloc(), MORECORE_CONTIGUOUS, mparams, next_chunk, page_align, PINUSE_BIT, prepend_alloc(), RELEASE_MORECORE_LOCK, segment_holding(), segment_holds, set_size_and_pinuse_of_inuse_chunk, SIZE_T_ONE, TOP_FOOT_SIZE, use_mmap, and use_noncontiguous.
Referenced by dlmalloc().
Definition at line 3696 of file SDL_malloc.c.
References ACQUIRE_MORECORE_LOCK, CALL_MORECORE, CALL_MREMAP, CALL_MUNMAP, check_top_chunk, CMFAIL, HALF_MAX_SIZE_T, has_segment_link(), HAVE_MMAP, HAVE_MORECORE, init_top(), is_extern_segment, is_initialized, is_mmapped_segment, MAX_REQUEST, MAX_SIZE_T, MFAIL, mparams, RELEASE_MORECORE_LOCK, release_unused_segments(), segment_holding(), SIZE_T_ONE, and TOP_FOOT_SIZE.
Referenced by dlfree(), and dlmalloc_trim().
Definition at line 3762 of file SDL_malloc.c.
References assert, chunk2mem, chunk_plus_offset, chunksize, compute_bit2idx, compute_tree_index, CORRUPTION_ERROR_ACTION, i, idx, idx2bit, insert_chunk, least_bit, left_bits, leftmost_child, leftshift_for_tree_index, MIN_CHUNK_SIZE, ok_address, ok_next, RTCHECK, set_inuse_and_pinuse, set_size_and_pinuse_of_free_chunk, set_size_and_pinuse_of_inuse_chunk, SIZE_T_BITSIZE, SIZE_T_ONE, treebin_at, and unlink_large_chunk.
Referenced by dlmalloc().
Definition at line 3837 of file SDL_malloc.c.
References assert, chunk2mem, chunk_plus_offset, chunksize, compute_bit2idx, CORRUPTION_ERROR_ACTION, i, least_bit, leftmost_child, MIN_CHUNK_SIZE, ok_address, ok_next, replace_dv, RTCHECK, set_inuse_and_pinuse, set_size_and_pinuse_of_free_chunk, set_size_and_pinuse_of_inuse_chunk, treebin_at, and unlink_large_chunk.
Referenced by dlmalloc().
|
static |
Definition at line 2104 of file SDL_malloc.c.
|
static |
Definition at line 1375 of file SDL_malloc.c.
|
static |
Definition at line 2101 of file SDL_malloc.c.
Referenced by change_mparam(), dlpvalloc(), dlvalloc(), init_mparams(), init_top(), mmap_resize(), sys_alloc(), and sys_trim().