mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
c,cpp: optimize msgpack_zone: variable-length array of chunk -> list of chunk
This commit is contained in:
parent
55cfbf378e
commit
8d365458d5
5 changed files with 88 additions and 109 deletions
|
|
@ -32,7 +32,7 @@ nobase_include_HEADERS = \
|
|||
libmsgpack_la_LIBADD = -L../c -lmsgpackc
|
||||
|
||||
# -version-info CURRENT:REVISION:AGE
|
||||
libmsgpack_la_LDFLAGS = -version-info 1:0:0
|
||||
libmsgpack_la_LDFLAGS = -version-info 2:0:0
|
||||
|
||||
check_PROGRAMS = \
|
||||
msgpack_test
|
||||
|
|
|
|||
|
|
@ -120,9 +120,8 @@ void zone::object_destructor(void* obj)
|
|||
|
||||
inline void zone::undo_malloc(size_t size)
|
||||
{
|
||||
msgpack_zone_chunk* chunk = base::chunk_array.tail;
|
||||
chunk->ptr -= size;
|
||||
chunk->free += size;
|
||||
base::chunk_list.ptr -= size;
|
||||
base::chunk_list.free += size;
|
||||
}
|
||||
|
||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue