Skip to content

Instantly share code, notes, and snippets.

@methane
Created July 9, 2019 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save methane/ab8e71c00423a776cb5819fa1e4f871f to your computer and use it in GitHub Desktop.
Save methane/ab8e71c00423a776cb5819fa1e4f871f to your computer and use it in GitHub Desktop.
0000000000001950 <_PyObject_Free>:
if (p == NULL) {
1950: 48 85 f6 test %rsi,%rsi
1953: 74 53 je 19a8 <_PyObject_Free+0x58>
pool = POOL_ADDR(p);
1955: 48 89 f0 mov %rsi,%rax
_Py_AllocatedBlocks--;
1958: 48 83 2d 00 00 00 00 subq $0x1,0x0(%rip) # 1960 <_PyObject_Free+0x10>
195f: 01
pool = POOL_ADDR(p);
1960: 48 25 00 f0 ff ff and $0xfffffffffffff000,%rax
uint arenaindex = *((volatile uint *)&pool->arenaindex);
1966: 8b 50 20 mov 0x20(%rax),%edx
(uintptr_t)p - arenas[arenaindex].address < ARENA_SIZE &&
1969: 3b 15 00 00 00 00 cmp 0x0(%rip),%edx # 196f <_PyObject_Free+0x1f>
196f: 73 27 jae 1998 <_PyObject_Free+0x48>
1971: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 1978 <_PyObject_Free+0x28>
1978: 48 8d 14 52 lea (%rdx,%rdx,2),%rdx
197c: 48 89 f1 mov %rsi,%rcx
197f: 48 c1 e2 04 shl $0x4,%rdx
1983: 48 8b 14 17 mov (%rdi,%rdx,1),%rdx
1987: 48 29 d1 sub %rdx,%rcx
198a: 48 81 f9 ff ff 03 00 cmp $0x3ffff,%rcx
1991: 77 05 ja 1998 <_PyObject_Free+0x48>
1993: 48 85 d2 test %rdx,%rdx
1996: 75 18 jne 19b0 <_PyObject_Free+0x60>
_PyMem_Raw.free(_PyMem_Raw.ctx, ptr);
1998: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 199f <_PyObject_Free+0x4f>
199f: ff 25 00 00 00 00 jmpq *0x0(%rip) # 19a5 <_PyObject_Free+0x55>
19a5: 0f 1f 00 nopl (%rax)
19a8: c3 retq
19a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
{
19b0: 53 push %rbx
19b1: 48 83 ec 10 sub $0x10,%rsp
*(block **)p = lastfree = pool->freeblock;
19b5: 48 8b 50 08 mov 0x8(%rax),%rdx
19b9: 48 89 16 mov %rdx,(%rsi)
pool->freeblock = (block *)p;
19bc: 48 89 70 08 mov %rsi,0x8(%rax)
if (UNLIKELY(!lastfree)) {
19c0: 48 85 d2 test %rdx,%rdx
19c3: 74 0b je 19d0 <_PyObject_Free+0x80>
if (LIKELY(--pool->ref.count != 0)) {
19c5: 83 28 01 subl $0x1,(%rax)
19c8: 74 46 je 1a10 <_PyObject_Free+0xc0>
}
19ca: 48 83 c4 10 add $0x10,%rsp
19ce: 5b pop %rbx
19cf: c3 retq
next = usedpools[size + size];
19d0: 8b 78 24 mov 0x24(%rax),%edi
19d3: 48 8d 0d 00 00 00 00 lea 0x0(%rip),%rcx # 19da <_PyObject_Free+0x8a>
--pool->ref.count;
19da: 83 28 01 subl $0x1,(%rax)
next = usedpools[size + size];
19dd: 8d 14 3f lea (%rdi,%rdi,1),%edx
19e0: 48 8b 14 d1 mov (%rcx,%rdx,8),%rdx
prev = next->prevpool;
19e4: 48 8b 4a 18 mov 0x18(%rdx),%rcx
pool->nextpool = next;
19e8: 48 89 54 24 08 mov %rdx,0x8(%rsp)
19ed: f3 0f 7e 44 24 08 movq 0x8(%rsp),%xmm0
19f3: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
19f8: 0f 16 44 24 08 movhps 0x8(%rsp),%xmm0
19fd: 0f 29 40 10 movaps %xmm0,0x10(%rax)
next->prevpool = pool;
1a01: 48 89 42 18 mov %rax,0x18(%rdx)
prev->nextpool = pool;
1a05: 48 89 41 10 mov %rax,0x10(%rcx)
goto success;
1a09: eb bf jmp 19ca <_PyObject_Free+0x7a>
1a0b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
next = pool->nextpool;
1a10: 48 8b 48 10 mov 0x10(%rax),%rcx
prev = pool->prevpool;
1a14: 48 8b 50 18 mov 0x18(%rax),%rdx
next->prevpool = prev;
1a18: 48 89 51 18 mov %rdx,0x18(%rcx)
prev->nextpool = next;
1a1c: 48 89 4a 10 mov %rcx,0x10(%rdx)
ao = &arenas[pool->arenaindex];
1a20: 8b 50 20 mov 0x20(%rax),%edx
struct arena_object* lastnf = nfp2lasta[nf];
1a23: 48 8d 0d 00 00 00 00 lea 0x0(%rip),%rcx # 1a2a <_PyObject_Free+0xda>
ao = &arenas[pool->arenaindex];
1a2a: 48 8d 1c 52 lea (%rdx,%rdx,2),%rbx
1a2e: 48 c1 e3 04 shl $0x4,%rbx
1a32: 48 01 fb add %rdi,%rbx
pool->nextpool = ao->freepools;
1a35: 48 8b 53 18 mov 0x18(%rbx),%rdx
nf = ao->nfreepools;
1a39: 8b 73 10 mov 0x10(%rbx),%esi
pool->nextpool = ao->freepools;
1a3c: 48 89 50 10 mov %rdx,0x10(%rax)
struct arena_object* lastnf = nfp2lasta[nf];
1a40: 48 8b 14 f1 mov (%rcx,%rsi,8),%rdx
ao->freepools = pool;
1a44: 48 89 43 18 mov %rax,0x18(%rbx)
nf = ao->nfreepools;
1a48: 48 89 f0 mov %rsi,%rax
if (lastnf == ao) { /* it is the rightmost */
1a4b: 48 39 d3 cmp %rdx,%rbx
1a4e: 0f 84 d4 00 00 00 je 1b28 <_PyObject_Free+0x1d8>
ao->nfreepools = ++nf;
1a54: 83 c0 01 add $0x1,%eax
1a57: 89 43 10 mov %eax,0x10(%rbx)
if (nf == ao->ntotalpools && ao->nextarena != NULL) {
1a5a: 3b 43 14 cmp 0x14(%rbx),%eax
1a5d: 74 61 je 1ac0 <_PyObject_Free+0x170>
if (nf == 1) {
1a5f: 83 f8 01 cmp $0x1,%eax
1a62: 0f 84 f1 00 00 00 je 1b59 <_PyObject_Free+0x209>
if (nfp2lasta[nf] == NULL) {
1a68: 48 83 3c c1 00 cmpq $0x0,(%rcx,%rax,8)
1a6d: 0f 84 dd 00 00 00 je 1b50 <_PyObject_Free+0x200>
if (ao == lastnf) {
1a73: 48 39 d3 cmp %rdx,%rbx
1a76: 0f 84 4e ff ff ff je 19ca <_PyObject_Free+0x7a>
if (ao->prevarena != NULL) {
1a7c: 48 8b 43 28 mov 0x28(%rbx),%rax
1a80: 48 8b 4b 20 mov 0x20(%rbx),%rcx
1a84: 48 85 c0 test %rax,%rax
1a87: 0f 84 09 01 00 00 je 1b96 <_PyObject_Free+0x246>
ao->prevarena->nextarena = ao->nextarena;
1a8d: 48 89 48 20 mov %rcx,0x20(%rax)
1a91: 48 8b 4b 20 mov 0x20(%rbx),%rcx
ao->nextarena->prevarena = ao->prevarena;
1a95: 48 89 41 28 mov %rax,0x28(%rcx)
ao->nextarena = lastnf->nextarena;
1a99: 48 8b 42 20 mov 0x20(%rdx),%rax
ao->prevarena = lastnf;
1a9d: 48 89 53 28 mov %rdx,0x28(%rbx)
ao->nextarena = lastnf->nextarena;
1aa1: 48 89 43 20 mov %rax,0x20(%rbx)
if (ao->nextarena != NULL) {
1aa5: 48 85 c0 test %rax,%rax
1aa8: 74 04 je 1aae <_PyObject_Free+0x15e>
ao->nextarena->prevarena = ao;
1aaa: 48 89 58 28 mov %rbx,0x28(%rax)
lastnf->nextarena = ao;
1aae: 48 89 5a 20 mov %rbx,0x20(%rdx)
goto success;
1ab2: e9 13 ff ff ff jmpq 19ca <_PyObject_Free+0x7a>
1ab7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
1abe: 00 00
if (nf == ao->ntotalpools && ao->nextarena != NULL) {
1ac0: 48 8b 73 20 mov 0x20(%rbx),%rsi
1ac4: 48 85 f6 test %rsi,%rsi
1ac7: 74 96 je 1a5f <_PyObject_Free+0x10f>
if (ao->prevarena == NULL) {
1ac9: 48 8b 43 28 mov 0x28(%rbx),%rax
1acd: 48 85 c0 test %rax,%rax
1ad0: 0f 84 cc 00 00 00 je 1ba2 <_PyObject_Free+0x252>
ao->prevarena->nextarena =
1ad6: 48 89 70 20 mov %rsi,0x20(%rax)
if (ao->nextarena != NULL) {
1ada: 48 8b 73 20 mov 0x20(%rbx),%rsi
1ade: 48 85 f6 test %rsi,%rsi
1ae1: 74 04 je 1ae7 <_PyObject_Free+0x197>
ao->nextarena->prevarena =
1ae3: 48 89 46 28 mov %rax,0x28(%rsi)
ao->nextarena = unused_arena_objects;
1ae7: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 1aee <_PyObject_Free+0x19e>
_PyObject_Arena.free(_PyObject_Arena.ctx,
1aee: ba 00 00 04 00 mov $0x40000,%edx
unused_arena_objects = ao;
1af3: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 1afa <_PyObject_Free+0x1aa>
_PyObject_Arena.free(_PyObject_Arena.ctx,
1afa: 48 8b 33 mov (%rbx),%rsi
1afd: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 1b04 <_PyObject_Free+0x1b4>
ao->nextarena = unused_arena_objects;
1b04: 48 89 43 20 mov %rax,0x20(%rbx)
_PyObject_Arena.free(_PyObject_Arena.ctx,
1b08: ff 15 00 00 00 00 callq *0x0(%rip) # 1b0e <_PyObject_Free+0x1be>
ao->address = 0; /* mark unassociated */
1b0e: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
--narenas_currently_allocated;
1b15: 48 83 2d 00 00 00 00 subq $0x1,0x0(%rip) # 1b1d <_PyObject_Free+0x1cd>
1b1c: 01
goto success;
1b1d: e9 a8 fe ff ff jmpq 19ca <_PyObject_Free+0x7a>
1b22: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
struct arena_object* p = ao->prevarena;
1b28: 48 8b 7b 28 mov 0x28(%rbx),%rdi
nfp2lasta[nf] = (p != NULL && p->nfreepools == nf) ? p : NULL;
1b2c: 48 85 ff test %rdi,%rdi
1b2f: 74 0d je 1b3e <_PyObject_Free+0x1ee>
1b31: 3b 77 10 cmp 0x10(%rdi),%esi
1b34: 41 b8 00 00 00 00 mov $0x0,%r8d
1b3a: 49 0f 45 f8 cmovne %r8,%rdi
1b3e: 48 89 3c f1 mov %rdi,(%rcx,%rsi,8)
1b42: e9 0d ff ff ff jmpq 1a54 <_PyObject_Free+0x104>
1b47: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
1b4e: 00 00
nfp2lasta[nf] = ao;
1b50: 48 89 1c c1 mov %rbx,(%rcx,%rax,8)
1b54: e9 1a ff ff ff jmpq 1a73 <_PyObject_Free+0x123>
ao->nextarena = usable_arenas;
1b59: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 1b60 <_PyObject_Free+0x210>
ao->prevarena = NULL;
1b60: 48 c7 43 28 00 00 00 movq $0x0,0x28(%rbx)
1b67: 00
ao->nextarena = usable_arenas;
1b68: 48 89 43 20 mov %rax,0x20(%rbx)
if (usable_arenas)
1b6c: 48 85 c0 test %rax,%rax
1b6f: 74 04 je 1b75 <_PyObject_Free+0x225>
usable_arenas->prevarena = ao;
1b71: 48 89 58 28 mov %rbx,0x28(%rax)
if (nfp2lasta[1] == NULL) {
1b75: 48 83 3d 00 00 00 00 cmpq $0x0,0x0(%rip) # 1b7d <_PyObject_Free+0x22d>
1b7c: 00
usable_arenas = ao;
1b7d: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 1b84 <_PyObject_Free+0x234>
if (nfp2lasta[1] == NULL) {
1b84: 0f 85 40 fe ff ff jne 19ca <_PyObject_Free+0x7a>
nfp2lasta[1] = ao;
1b8a: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 1b91 <_PyObject_Free+0x241>
1b91: e9 34 fe ff ff jmpq 19ca <_PyObject_Free+0x7a>
usable_arenas = ao->nextarena;
1b96: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 1b9d <_PyObject_Free+0x24d>
1b9d: e9 f3 fe ff ff jmpq 1a95 <_PyObject_Free+0x145>
usable_arenas = ao->nextarena;
1ba2: 48 89 35 00 00 00 00 mov %rsi,0x0(%rip) # 1ba9 <_PyObject_Free+0x259>
if (ao->nextarena != NULL) {
1ba9: e9 35 ff ff ff jmpq 1ae3 <_PyObject_Free+0x193>
1bae: 66 90 xchg %ax,%ax
0000000000002190 <_PyObject_Malloc>:
{
2190: 41 54 push %r12
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
2192: 48 8d 46 ff lea -0x1(%rsi),%rax
{
2196: 55 push %rbp
2197: 53 push %rbx
2198: 48 83 ec 10 sub $0x10,%rsp
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
219c: 48 3d ff 01 00 00 cmp $0x1ff,%rax
21a2: 77 74 ja 2218 <_PyObject_Malloc+0x88>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
21a4: 8d 5e ff lea -0x1(%rsi),%ebx
pool = usedpools[size + size];
21a7: 4c 8d 25 00 00 00 00 lea 0x0(%rip),%r12 # 21ae <_PyObject_Malloc+0x1e>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
21ae: c1 eb 04 shr $0x4,%ebx
pool = usedpools[size + size];
21b1: 8d 2c 1b lea (%rbx,%rbx,1),%ebp
21b4: 49 8b 14 ec mov (%r12,%rbp,8),%rdx
if (LIKELY(pool != pool->nextpool)) {
21b8: 48 8b 7a 10 mov 0x10(%rdx),%rdi
21bc: 48 39 fa cmp %rdi,%rdx
21bf: 74 77 je 2238 <_PyObject_Malloc+0xa8>
bp = pool->freeblock;
21c1: 48 8b 42 08 mov 0x8(%rdx),%rax
++pool->ref.count;
21c5: 83 02 01 addl $0x1,(%rdx)
if (LIKELY((pool->freeblock = *(block **)bp) != NULL)) {
21c8: 48 8b 08 mov (%rax),%rcx
21cb: 48 89 4a 08 mov %rcx,0x8(%rdx)
21cf: 48 85 c9 test %rcx,%rcx
21d2: 74 14 je 21e8 <_PyObject_Malloc+0x58>
_Py_AllocatedBlocks++;
21d4: 48 83 05 00 00 00 00 addq $0x1,0x0(%rip) # 21dc <_PyObject_Malloc+0x4c>
21db: 01
}
21dc: 48 83 c4 10 add $0x10,%rsp
21e0: 5b pop %rbx
21e1: 5d pop %rbp
21e2: 41 5c pop %r12
21e4: c3 retq
21e5: 0f 1f 00 nopl (%rax)
if (pool->nextoffset <= pool->maxnextoffset) {
21e8: 8b 4a 28 mov 0x28(%rdx),%ecx
21eb: 3b 4a 2c cmp 0x2c(%rdx),%ecx
21ee: 0f 87 0c 01 00 00 ja 2300 <_PyObject_Malloc+0x170>
pool->nextoffset += INDEX2SIZE(size);
21f4: 83 c3 01 add $0x1,%ebx
pool->nextoffset;
21f7: 89 ce mov %ecx,%esi
pool->nextoffset += INDEX2SIZE(size);
21f9: c1 e3 04 shl $0x4,%ebx
pool->freeblock = (block*)pool +
21fc: 48 01 d6 add %rdx,%rsi
pool->nextoffset += INDEX2SIZE(size);
21ff: 01 d9 add %ebx,%ecx
pool->freeblock = (block*)pool +
2201: 48 89 72 08 mov %rsi,0x8(%rdx)
pool->nextoffset += INDEX2SIZE(size);
2205: 89 4a 28 mov %ecx,0x28(%rdx)
*(block **)(pool->freeblock) = NULL;
2208: 48 c7 06 00 00 00 00 movq $0x0,(%rsi)
goto success;
220f: eb c3 jmp 21d4 <_PyObject_Malloc+0x44>
2211: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
if (size > (size_t)PY_SSIZE_T_MAX)
2218: 48 85 f6 test %rsi,%rsi
221b: 0f 88 8f 01 00 00 js 23b0 <_PyObject_Malloc+0x220>
return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);
2221: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 2228 <_PyObject_Malloc+0x98>
2228: ff 15 00 00 00 00 callq *0x0(%rip) # 222e <_PyObject_Malloc+0x9e>
if (ptr != NULL) {
222e: 48 85 c0 test %rax,%rax
2231: 75 a1 jne 21d4 <_PyObject_Malloc+0x44>
2233: eb a7 jmp 21dc <_PyObject_Malloc+0x4c>
2235: 0f 1f 00 nopl (%rax)
if (usable_arenas == NULL) {
2238: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 223f <_PyObject_Malloc+0xaf>
223f: 48 85 c9 test %rcx,%rcx
2242: 0f 84 d0 00 00 00 je 2318 <_PyObject_Malloc+0x188>
if (nfp2lasta[usable_arenas->nfreepools] == usable_arenas) {
2248: 8b 51 10 mov 0x10(%rcx),%edx
224b: 48 8d 3d 00 00 00 00 lea 0x0(%rip),%rdi # 2252 <_PyObject_Malloc+0xc2>
2252: 48 8b 04 d7 mov (%rdi,%rdx,8),%rax
2256: 48 89 d6 mov %rdx,%rsi
2259: 48 39 c1 cmp %rax,%rcx
225c: 0f 84 ee 00 00 00 je 2350 <_PyObject_Malloc+0x1c0>
if (usable_arenas->nfreepools > 1) {
2262: 48 8b 51 18 mov 0x18(%rcx),%rdx
2266: 8d 46 ff lea -0x1(%rsi),%eax
2269: 83 fe 01 cmp $0x1,%esi
226c: 0f 86 ee 00 00 00 jbe 2360 <_PyObject_Malloc+0x1d0>
nfp2lasta[usable_arenas->nfreepools - 1] = usable_arenas;
2272: 89 c6 mov %eax,%esi
2274: 48 89 0c f7 mov %rcx,(%rdi,%rsi,8)
if (pool != NULL) {
2278: 48 85 d2 test %rdx,%rdx
227b: 0f 84 3f 01 00 00 je 23c0 <_PyObject_Malloc+0x230>
usable_arenas->freepools = pool->nextpool;
2281: 48 8b 72 10 mov 0x10(%rdx),%rsi
--usable_arenas->nfreepools;
2285: 89 41 10 mov %eax,0x10(%rcx)
usable_arenas->freepools = pool->nextpool;
2288: 48 89 71 18 mov %rsi,0x18(%rcx)
if (usable_arenas->nfreepools == 0) {
228c: 8b 4a 24 mov 0x24(%rdx),%ecx
next = usedpools[size + size]; /* == prev */
228f: 49 8b 04 ec mov (%r12,%rbp,8),%rax
pool->nextpool = next;
2293: 48 89 44 24 08 mov %rax,0x8(%rsp)
2298: f3 0f 7e 44 24 08 movq 0x8(%rsp),%xmm0
next->nextpool = pool;
229e: 48 89 54 24 08 mov %rdx,0x8(%rsp)
pool->nextpool = next;
22a3: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
22a7: 0f 11 42 10 movups %xmm0,0x10(%rdx)
next->nextpool = pool;
22ab: f3 0f 7e 44 24 08 movq 0x8(%rsp),%xmm0
22b1: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
22b5: 0f 11 40 10 movups %xmm0,0x10(%rax)
pool->ref.count = 1;
22b9: c7 02 01 00 00 00 movl $0x1,(%rdx)
if (pool->szidx == size) {
22bf: 39 cb cmp %ecx,%ebx
22c1: 0f 84 d9 00 00 00 je 23a0 <_PyObject_Malloc+0x210>
pool->szidx = size;
22c7: 89 5a 24 mov %ebx,0x24(%rdx)
size = INDEX2SIZE(size);
22ca: 83 c3 01 add $0x1,%ebx
bp = (block *)pool + POOL_OVERHEAD;
22cd: 48 8d 42 30 lea 0x30(%rdx),%rax
pool->maxnextoffset = POOL_SIZE - size;
22d1: be 00 10 00 00 mov $0x1000,%esi
size = INDEX2SIZE(size);
22d6: 89 d9 mov %ebx,%ecx
pool->nextoffset = POOL_OVERHEAD + (size << 1);
22d8: c1 e3 05 shl $0x5,%ebx
size = INDEX2SIZE(size);
22db: c1 e1 04 shl $0x4,%ecx
pool->nextoffset = POOL_OVERHEAD + (size << 1);
22de: 83 c3 30 add $0x30,%ebx
pool->maxnextoffset = POOL_SIZE - size;
22e1: 29 ce sub %ecx,%esi
pool->freeblock = bp + size;
22e3: 48 01 c1 add %rax,%rcx
pool->nextoffset = POOL_OVERHEAD + (size << 1);
22e6: 89 5a 28 mov %ebx,0x28(%rdx)
pool->maxnextoffset = POOL_SIZE - size;
22e9: 89 72 2c mov %esi,0x2c(%rdx)
pool->freeblock = bp + size;
22ec: 48 89 4a 08 mov %rcx,0x8(%rdx)
*(block **)(pool->freeblock) = NULL;
22f0: 48 c7 01 00 00 00 00 movq $0x0,(%rcx)
goto success;
22f7: e9 d8 fe ff ff jmpq 21d4 <_PyObject_Malloc+0x44>
22fc: 0f 1f 40 00 nopl 0x0(%rax)
pool = pool->prevpool;
2300: 48 8b 52 18 mov 0x18(%rdx),%rdx
next->prevpool = pool;
2304: 48 89 57 18 mov %rdx,0x18(%rdi)
pool->nextpool = next;
2308: 48 89 7a 10 mov %rdi,0x10(%rdx)
goto success;
230c: e9 c3 fe ff ff jmpq 21d4 <_PyObject_Malloc+0x44>
2311: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
2318: 48 89 74 24 08 mov %rsi,0x8(%rsp)
usable_arenas = new_arena();
231d: e8 4e f0 ff ff callq 1370 <new_arena>
if (usable_arenas == NULL) {
2322: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
2327: 48 85 c0 test %rax,%rax
usable_arenas = new_arena();
232a: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2331 <_PyObject_Malloc+0x1a1>
if (usable_arenas == NULL) {
2331: 0f 84 ea fe ff ff je 2221 <_PyObject_Malloc+0x91>
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2337: 8b 50 10 mov 0x10(%rax),%edx
233a: 48 8d 3d 00 00 00 00 lea 0x0(%rip),%rdi # 2341 <_PyObject_Malloc+0x1b1>
usable_arenas->nextarena =
2341: 66 0f ef c0 pxor %xmm0,%xmm0
2345: 0f 11 40 20 movups %xmm0,0x20(%rax)
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2349: 48 89 04 d7 mov %rax,(%rdi,%rdx,8)
234d: 48 89 d6 mov %rdx,%rsi
nfp2lasta[usable_arenas->nfreepools] = NULL;
2350: 48 c7 04 d7 00 00 00 movq $0x0,(%rdi,%rdx,8)
2357: 00
2358: 48 89 c1 mov %rax,%rcx
235b: e9 02 ff ff ff jmpq 2262 <_PyObject_Malloc+0xd2>
if (pool != NULL) {
2360: 48 85 d2 test %rdx,%rdx
2363: 74 5b je 23c0 <_PyObject_Malloc+0x230>
usable_arenas->freepools = pool->nextpool;
2365: 48 8b 72 10 mov 0x10(%rdx),%rsi
--usable_arenas->nfreepools;
2369: 89 41 10 mov %eax,0x10(%rcx)
usable_arenas->freepools = pool->nextpool;
236c: 48 89 71 18 mov %rsi,0x18(%rcx)
if (usable_arenas->nfreepools == 0) {
2370: 85 c0 test %eax,%eax
2372: 0f 85 14 ff ff ff jne 228c <_PyObject_Malloc+0xfc>
usable_arenas = usable_arenas->nextarena;
2378: 48 8b 41 20 mov 0x20(%rcx),%rax
237c: 8b 4a 24 mov 0x24(%rdx),%ecx
237f: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2386 <_PyObject_Malloc+0x1f6>
if (usable_arenas != NULL) {
2386: 48 85 c0 test %rax,%rax
2389: 0f 84 00 ff ff ff je 228f <_PyObject_Malloc+0xff>
usable_arenas->prevarena = NULL;
238f: 48 c7 40 28 00 00 00 movq $0x0,0x28(%rax)
2396: 00
2397: e9 f3 fe ff ff jmpq 228f <_PyObject_Malloc+0xff>
239c: 0f 1f 40 00 nopl 0x0(%rax)
bp = pool->freeblock;
23a0: 48 8b 42 08 mov 0x8(%rdx),%rax
pool->freeblock = *(block **)bp;
23a4: 48 8b 08 mov (%rax),%rcx
23a7: 48 89 4a 08 mov %rcx,0x8(%rdx)
goto success;
23ab: e9 24 fe ff ff jmpq 21d4 <_PyObject_Malloc+0x44>
return NULL;
23b0: 31 c0 xor %eax,%eax
23b2: e9 25 fe ff ff jmpq 21dc <_PyObject_Malloc+0x4c>
23b7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
23be: 00 00
pool->arenaindex = (uint)(usable_arenas - arenas);
23c0: 48 89 ce mov %rcx,%rsi
23c3: 48 2b 35 00 00 00 00 sub 0x0(%rip),%rsi # 23ca <_PyObject_Malloc+0x23a>
pool = (poolp)usable_arenas->pool_address;
23ca: 48 8b 51 08 mov 0x8(%rcx),%rdx
pool->arenaindex = (uint)(usable_arenas - arenas);
23ce: 48 bf ab aa aa aa aa movabs $0xaaaaaaaaaaaaaaab,%rdi
23d5: aa aa aa
23d8: 48 c1 fe 04 sar $0x4,%rsi
23dc: 48 0f af f7 imul %rdi,%rsi
pool->szidx = DUMMY_SIZE_IDX;
23e0: c7 42 24 ff ff 00 00 movl $0xffff,0x24(%rdx)
pool->arenaindex = (uint)(usable_arenas - arenas);
23e7: 89 72 20 mov %esi,0x20(%rdx)
usable_arenas->pool_address += POOL_SIZE;
23ea: 48 8d b2 00 10 00 00 lea 0x1000(%rdx),%rsi
23f1: 48 89 71 08 mov %rsi,0x8(%rcx)
--usable_arenas->nfreepools;
23f5: 89 41 10 mov %eax,0x10(%rcx)
if (usable_arenas->nfreepools == 0) {
23f8: 85 c0 test %eax,%eax
23fa: 75 18 jne 2414 <_PyObject_Malloc+0x284>
usable_arenas = usable_arenas->nextarena;
23fc: 48 8b 41 20 mov 0x20(%rcx),%rax
2400: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2407 <_PyObject_Malloc+0x277>
if (usable_arenas != NULL) {
2407: 48 85 c0 test %rax,%rax
240a: 74 08 je 2414 <_PyObject_Malloc+0x284>
usable_arenas->prevarena = NULL;
240c: 48 c7 40 28 00 00 00 movq $0x0,0x28(%rax)
2413: 00
next = usedpools[size + size]; /* == prev */
2414: 49 8b 04 ec mov (%r12,%rbp,8),%rax
pool->nextpool = next;
2418: 48 89 44 24 08 mov %rax,0x8(%rsp)
241d: f3 0f 7e 44 24 08 movq 0x8(%rsp),%xmm0
next->nextpool = pool;
2423: 48 89 54 24 08 mov %rdx,0x8(%rsp)
pool->nextpool = next;
2428: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
242c: 0f 11 42 10 movups %xmm0,0x10(%rdx)
next->nextpool = pool;
2430: f3 0f 7e 44 24 08 movq 0x8(%rsp),%xmm0
2436: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
243a: 0f 11 40 10 movups %xmm0,0x10(%rax)
pool->ref.count = 1;
243e: c7 02 01 00 00 00 movl $0x1,(%rdx)
if (pool->szidx == size) {
2444: e9 7e fe ff ff jmpq 22c7 <_PyObject_Malloc+0x137>
2449: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
0000000000002450 <_PyObject_Calloc>:
{
2450: 41 55 push %r13
2452: 41 54 push %r12
2454: 55 push %rbp
2455: 53 push %rbx
2456: 48 89 d3 mov %rdx,%rbx
size_t nbytes = nelem * elsize;
2459: 48 89 f2 mov %rsi,%rdx
245c: 48 0f af d3 imul %rbx,%rdx
{
2460: 48 83 ec 18 sub $0x18,%rsp
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
2464: 48 8d 42 ff lea -0x1(%rdx),%rax
2468: 48 3d ff 01 00 00 cmp $0x1ff,%rax
246e: 77 60 ja 24d0 <_PyObject_Calloc+0x80>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
2470: 8d 6a ff lea -0x1(%rdx),%ebp
pool = usedpools[size + size];
2473: 4c 8d 2d 00 00 00 00 lea 0x0(%rip),%r13 # 247a <_PyObject_Calloc+0x2a>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
247a: c1 ed 04 shr $0x4,%ebp
pool = usedpools[size + size];
247d: 44 8d 64 2d 00 lea 0x0(%rbp,%rbp,1),%r12d
2482: 4b 8b 44 e5 00 mov 0x0(%r13,%r12,8),%rax
if (LIKELY(pool != pool->nextpool)) {
2487: 48 8b 78 10 mov 0x10(%rax),%rdi
248b: 48 39 f8 cmp %rdi,%rax
248e: 0f 84 bc 00 00 00 je 2550 <_PyObject_Calloc+0x100>
bp = pool->freeblock;
2494: 48 8b 48 08 mov 0x8(%rax),%rcx
++pool->ref.count;
2498: 83 00 01 addl $0x1,(%rax)
if (LIKELY((pool->freeblock = *(block **)bp) != NULL)) {
249b: 48 8b 31 mov (%rcx),%rsi
249e: 48 89 70 08 mov %rsi,0x8(%rax)
24a2: 48 85 f6 test %rsi,%rsi
24a5: 74 79 je 2520 <_PyObject_Calloc+0xd0>
24a7: 48 89 cf mov %rcx,%rdi
24aa: 31 f6 xor %esi,%esi
24ac: e8 00 00 00 00 callq 24b1 <_PyObject_Calloc+0x61>
_Py_AllocatedBlocks++;
24b1: 48 83 05 00 00 00 00 addq $0x1,0x0(%rip) # 24b9 <_PyObject_Calloc+0x69>
24b8: 01
}
24b9: 48 83 c4 18 add $0x18,%rsp
24bd: 48 89 c1 mov %rax,%rcx
24c0: 5b pop %rbx
24c1: 5d pop %rbp
24c2: 48 89 c8 mov %rcx,%rax
24c5: 41 5c pop %r12
24c7: 41 5d pop %r13
24c9: c3 retq
24ca: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize)
24d0: 48 85 db test %rbx,%rbx
24d3: 75 33 jne 2508 <_PyObject_Calloc+0xb8>
return _PyMem_Raw.calloc(_PyMem_Raw.ctx, nelem, elsize);
24d5: 48 89 da mov %rbx,%rdx
24d8: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 24df <_PyObject_Calloc+0x8f>
24df: ff 15 00 00 00 00 callq *0x0(%rip) # 24e5 <_PyObject_Calloc+0x95>
24e5: 48 89 c1 mov %rax,%rcx
if (ptr != NULL) {
24e8: 48 85 c0 test %rax,%rax
24eb: 74 08 je 24f5 <_PyObject_Calloc+0xa5>
_Py_AllocatedBlocks++;
24ed: 48 83 05 00 00 00 00 addq $0x1,0x0(%rip) # 24f5 <_PyObject_Calloc+0xa5>
24f4: 01
}
24f5: 48 83 c4 18 add $0x18,%rsp
24f9: 48 89 c8 mov %rcx,%rax
24fc: 5b pop %rbx
24fd: 5d pop %rbp
24fe: 41 5c pop %r12
2500: 41 5d pop %r13
2502: c3 retq
2503: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize)
2508: 48 b8 ff ff ff ff ff movabs $0x7fffffffffffffff,%rax
250f: ff ff 7f
2512: 31 d2 xor %edx,%edx
2514: 48 f7 f3 div %rbx
2517: 48 39 c6 cmp %rax,%rsi
251a: 76 b9 jbe 24d5 <_PyObject_Calloc+0x85>
return NULL;
251c: 31 c9 xor %ecx,%ecx
251e: eb d5 jmp 24f5 <_PyObject_Calloc+0xa5>
if (pool->nextoffset <= pool->maxnextoffset) {
2520: 8b 70 28 mov 0x28(%rax),%esi
2523: 3b 70 2c cmp 0x2c(%rax),%esi
2526: 0f 87 ec 00 00 00 ja 2618 <_PyObject_Calloc+0x1c8>
pool->nextoffset += INDEX2SIZE(size);
252c: 83 c5 01 add $0x1,%ebp
pool->nextoffset;
252f: 89 f7 mov %esi,%edi
pool->nextoffset += INDEX2SIZE(size);
2531: c1 e5 04 shl $0x4,%ebp
pool->freeblock = (block*)pool +
2534: 48 01 c7 add %rax,%rdi
pool->nextoffset += INDEX2SIZE(size);
2537: 01 ee add %ebp,%esi
pool->freeblock = (block*)pool +
2539: 48 89 78 08 mov %rdi,0x8(%rax)
pool->nextoffset += INDEX2SIZE(size);
253d: 89 70 28 mov %esi,0x28(%rax)
*(block **)(pool->freeblock) = NULL;
2540: 48 c7 07 00 00 00 00 movq $0x0,(%rdi)
goto success;
2547: e9 5b ff ff ff jmpq 24a7 <_PyObject_Calloc+0x57>
254c: 0f 1f 40 00 nopl 0x0(%rax)
if (usable_arenas == NULL) {
2550: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 2557 <_PyObject_Calloc+0x107>
2557: 48 85 c9 test %rcx,%rcx
255a: 0f 84 d0 00 00 00 je 2630 <_PyObject_Calloc+0x1e0>
if (nfp2lasta[usable_arenas->nfreepools] == usable_arenas) {
2560: 8b 79 10 mov 0x10(%rcx),%edi
2563: 4c 8d 05 00 00 00 00 lea 0x0(%rip),%r8 # 256a <_PyObject_Calloc+0x11a>
256a: 49 8b 04 f8 mov (%r8,%rdi,8),%rax
256e: 48 89 fe mov %rdi,%rsi
2571: 48 39 c1 cmp %rax,%rcx
2574: 0f 84 f6 00 00 00 je 2670 <_PyObject_Calloc+0x220>
if (usable_arenas->nfreepools > 1) {
257a: 48 8b 41 18 mov 0x18(%rcx),%rax
257e: 8d 7e ff lea -0x1(%rsi),%edi
2581: 83 fe 01 cmp $0x1,%esi
2584: 0f 86 f6 00 00 00 jbe 2680 <_PyObject_Calloc+0x230>
nfp2lasta[usable_arenas->nfreepools - 1] = usable_arenas;
258a: 89 fe mov %edi,%esi
258c: 49 89 0c f0 mov %rcx,(%r8,%rsi,8)
if (pool != NULL) {
2590: 48 85 c0 test %rax,%rax
2593: 0f 84 37 01 00 00 je 26d0 <_PyObject_Calloc+0x280>
usable_arenas->freepools = pool->nextpool;
2599: 48 8b 70 10 mov 0x10(%rax),%rsi
--usable_arenas->nfreepools;
259d: 89 79 10 mov %edi,0x10(%rcx)
usable_arenas->freepools = pool->nextpool;
25a0: 48 89 71 18 mov %rsi,0x18(%rcx)
if (usable_arenas->nfreepools == 0) {
25a4: 8b 70 24 mov 0x24(%rax),%esi
next = usedpools[size + size]; /* == prev */
25a7: 4b 8b 4c e5 00 mov 0x0(%r13,%r12,8),%rcx
pool->nextpool = next;
25ac: 48 89 0c 24 mov %rcx,(%rsp)
25b0: f3 0f 7e 04 24 movq (%rsp),%xmm0
next->nextpool = pool;
25b5: 48 89 04 24 mov %rax,(%rsp)
pool->nextpool = next;
25b9: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
25bd: 0f 11 40 10 movups %xmm0,0x10(%rax)
next->nextpool = pool;
25c1: f3 0f 7e 04 24 movq (%rsp),%xmm0
25c6: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
25ca: 0f 11 41 10 movups %xmm0,0x10(%rcx)
pool->ref.count = 1;
25ce: c7 00 01 00 00 00 movl $0x1,(%rax)
if (pool->szidx == size) {
25d4: 39 f5 cmp %esi,%ebp
25d6: 0f 84 e4 00 00 00 je 26c0 <_PyObject_Calloc+0x270>
pool->szidx = size;
25dc: 89 68 24 mov %ebp,0x24(%rax)
size = INDEX2SIZE(size);
25df: 83 c5 01 add $0x1,%ebp
bp = (block *)pool + POOL_OVERHEAD;
25e2: 48 8d 48 30 lea 0x30(%rax),%rcx
pool->maxnextoffset = POOL_SIZE - size;
25e6: bf 00 10 00 00 mov $0x1000,%edi
size = INDEX2SIZE(size);
25eb: 89 ee mov %ebp,%esi
pool->nextoffset = POOL_OVERHEAD + (size << 1);
25ed: c1 e5 05 shl $0x5,%ebp
size = INDEX2SIZE(size);
25f0: c1 e6 04 shl $0x4,%esi
pool->nextoffset = POOL_OVERHEAD + (size << 1);
25f3: 83 c5 30 add $0x30,%ebp
pool->maxnextoffset = POOL_SIZE - size;
25f6: 29 f7 sub %esi,%edi
pool->freeblock = bp + size;
25f8: 48 01 ce add %rcx,%rsi
pool->nextoffset = POOL_OVERHEAD + (size << 1);
25fb: 89 68 28 mov %ebp,0x28(%rax)
pool->maxnextoffset = POOL_SIZE - size;
25fe: 89 78 2c mov %edi,0x2c(%rax)
pool->freeblock = bp + size;
2601: 48 89 70 08 mov %rsi,0x8(%rax)
*(block **)(pool->freeblock) = NULL;
2605: 48 c7 06 00 00 00 00 movq $0x0,(%rsi)
goto success;
260c: e9 96 fe ff ff jmpq 24a7 <_PyObject_Calloc+0x57>
2611: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
pool = pool->prevpool;
2618: 48 8b 40 18 mov 0x18(%rax),%rax
next->prevpool = pool;
261c: 48 89 47 18 mov %rax,0x18(%rdi)
pool->nextpool = next;
2620: 48 89 78 10 mov %rdi,0x10(%rax)
goto success;
2624: e9 7e fe ff ff jmpq 24a7 <_PyObject_Calloc+0x57>
2629: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
2630: 48 89 34 24 mov %rsi,(%rsp)
2634: 48 89 54 24 08 mov %rdx,0x8(%rsp)
usable_arenas = new_arena();
2639: e8 32 ed ff ff callq 1370 <new_arena>
if (usable_arenas == NULL) {
263e: 48 8b 34 24 mov (%rsp),%rsi
2642: 48 85 c0 test %rax,%rax
usable_arenas = new_arena();
2645: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 264c <_PyObject_Calloc+0x1fc>
if (usable_arenas == NULL) {
264c: 0f 84 7e fe ff ff je 24d0 <_PyObject_Calloc+0x80>
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2652: 8b 78 10 mov 0x10(%rax),%edi
2655: 4c 8d 05 00 00 00 00 lea 0x0(%rip),%r8 # 265c <_PyObject_Calloc+0x20c>
usable_arenas->nextarena =
265c: 66 0f ef c0 pxor %xmm0,%xmm0
2660: 48 8b 54 24 08 mov 0x8(%rsp),%rdx
2665: 0f 11 40 20 movups %xmm0,0x20(%rax)
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2669: 49 89 04 f8 mov %rax,(%r8,%rdi,8)
266d: 48 89 fe mov %rdi,%rsi
nfp2lasta[usable_arenas->nfreepools] = NULL;
2670: 49 c7 04 f8 00 00 00 movq $0x0,(%r8,%rdi,8)
2677: 00
2678: 48 89 c1 mov %rax,%rcx
267b: e9 fa fe ff ff jmpq 257a <_PyObject_Calloc+0x12a>
if (pool != NULL) {
2680: 48 85 c0 test %rax,%rax
2683: 74 4b je 26d0 <_PyObject_Calloc+0x280>
usable_arenas->freepools = pool->nextpool;
2685: 48 8b 70 10 mov 0x10(%rax),%rsi
--usable_arenas->nfreepools;
2689: 89 79 10 mov %edi,0x10(%rcx)
usable_arenas->freepools = pool->nextpool;
268c: 48 89 71 18 mov %rsi,0x18(%rcx)
if (usable_arenas->nfreepools == 0) {
2690: 85 ff test %edi,%edi
2692: 0f 85 0c ff ff ff jne 25a4 <_PyObject_Calloc+0x154>
usable_arenas = usable_arenas->nextarena;
2698: 48 8b 49 20 mov 0x20(%rcx),%rcx
269c: 8b 70 24 mov 0x24(%rax),%esi
269f: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 26a6 <_PyObject_Calloc+0x256>
if (usable_arenas != NULL) {
26a6: 48 85 c9 test %rcx,%rcx
26a9: 0f 84 f8 fe ff ff je 25a7 <_PyObject_Calloc+0x157>
usable_arenas->prevarena = NULL;
26af: 48 c7 41 28 00 00 00 movq $0x0,0x28(%rcx)
26b6: 00
26b7: e9 eb fe ff ff jmpq 25a7 <_PyObject_Calloc+0x157>
26bc: 0f 1f 40 00 nopl 0x0(%rax)
bp = pool->freeblock;
26c0: 48 8b 48 08 mov 0x8(%rax),%rcx
pool->freeblock = *(block **)bp;
26c4: 48 8b 31 mov (%rcx),%rsi
26c7: 48 89 70 08 mov %rsi,0x8(%rax)
goto success;
26cb: e9 d7 fd ff ff jmpq 24a7 <_PyObject_Calloc+0x57>
pool->arenaindex = (uint)(usable_arenas - arenas);
26d0: 48 89 ce mov %rcx,%rsi
26d3: 48 2b 35 00 00 00 00 sub 0x0(%rip),%rsi # 26da <_PyObject_Calloc+0x28a>
pool = (poolp)usable_arenas->pool_address;
26da: 48 8b 41 08 mov 0x8(%rcx),%rax
pool->arenaindex = (uint)(usable_arenas - arenas);
26de: 49 b8 ab aa aa aa aa movabs $0xaaaaaaaaaaaaaaab,%r8
26e5: aa aa aa
26e8: 48 c1 fe 04 sar $0x4,%rsi
26ec: 49 0f af f0 imul %r8,%rsi
pool->szidx = DUMMY_SIZE_IDX;
26f0: c7 40 24 ff ff 00 00 movl $0xffff,0x24(%rax)
pool->arenaindex = (uint)(usable_arenas - arenas);
26f7: 89 70 20 mov %esi,0x20(%rax)
usable_arenas->pool_address += POOL_SIZE;
26fa: 48 8d b0 00 10 00 00 lea 0x1000(%rax),%rsi
2701: 48 89 71 08 mov %rsi,0x8(%rcx)
--usable_arenas->nfreepools;
2705: 89 79 10 mov %edi,0x10(%rcx)
if (usable_arenas->nfreepools == 0) {
2708: 85 ff test %edi,%edi
270a: 75 18 jne 2724 <_PyObject_Calloc+0x2d4>
usable_arenas = usable_arenas->nextarena;
270c: 48 8b 49 20 mov 0x20(%rcx),%rcx
2710: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 2717 <_PyObject_Calloc+0x2c7>
if (usable_arenas != NULL) {
2717: 48 85 c9 test %rcx,%rcx
271a: 74 08 je 2724 <_PyObject_Calloc+0x2d4>
usable_arenas->prevarena = NULL;
271c: 48 c7 41 28 00 00 00 movq $0x0,0x28(%rcx)
2723: 00
next = usedpools[size + size]; /* == prev */
2724: 4b 8b 4c e5 00 mov 0x0(%r13,%r12,8),%rcx
pool->nextpool = next;
2729: 48 89 0c 24 mov %rcx,(%rsp)
272d: f3 0f 7e 04 24 movq (%rsp),%xmm0
next->nextpool = pool;
2732: 48 89 04 24 mov %rax,(%rsp)
pool->nextpool = next;
2736: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
273a: 0f 11 40 10 movups %xmm0,0x10(%rax)
next->nextpool = pool;
273e: f3 0f 7e 04 24 movq (%rsp),%xmm0
2743: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
2747: 0f 11 41 10 movups %xmm0,0x10(%rcx)
pool->ref.count = 1;
274b: c7 00 01 00 00 00 movl $0x1,(%rax)
if (pool->szidx == size) {
2751: e9 86 fe ff ff jmpq 25dc <_PyObject_Calloc+0x18c>
2756: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
275d: 00 00 00
0000000000002760 <_PyObject_Realloc>:
{
2760: 41 57 push %r15
2762: 41 56 push %r14
2764: 41 55 push %r13
2766: 41 54 push %r12
2768: 55 push %rbp
2769: 53 push %rbx
276a: 48 83 ec 18 sub $0x18,%rsp
if (ptr == NULL) {
276e: 48 85 f6 test %rsi,%rsi
2771: 0f 84 69 02 00 00 je 29e0 <_PyObject_Realloc+0x280>
pool = POOL_ADDR(p);
2777: 49 89 f4 mov %rsi,%r12
return arenaindex < maxarenas &&
277a: 44 8b 3d 00 00 00 00 mov 0x0(%rip),%r15d # 2781 <_PyObject_Realloc+0x21>
2781: 48 89 f5 mov %rsi,%rbp
pool = POOL_ADDR(p);
2784: 49 81 e4 00 f0 ff ff and $0xfffffffffffff000,%r12
uint arenaindex = *((volatile uint *)&pool->arenaindex);
278b: 41 8b 44 24 20 mov 0x20(%r12),%eax
(uintptr_t)p - arenas[arenaindex].address < ARENA_SIZE &&
2790: 44 39 f8 cmp %r15d,%eax
2793: 73 26 jae 27bb <_PyObject_Realloc+0x5b>
2795: 48 8d 04 40 lea (%rax,%rax,2),%rax
2799: 48 89 f1 mov %rsi,%rcx
279c: 48 c1 e0 04 shl $0x4,%rax
27a0: 48 03 05 00 00 00 00 add 0x0(%rip),%rax # 27a7 <_PyObject_Realloc+0x47>
27a7: 48 8b 00 mov (%rax),%rax
27aa: 48 29 c1 sub %rax,%rcx
27ad: 48 81 f9 ff ff 03 00 cmp $0x3ffff,%rcx
27b4: 77 05 ja 27bb <_PyObject_Realloc+0x5b>
27b6: 48 85 c0 test %rax,%rax
27b9: 75 2d jne 27e8 <_PyObject_Realloc+0x88>
if (new_size > (size_t)PY_SSIZE_T_MAX)
27bb: 48 85 d2 test %rdx,%rdx
27be: 0f 88 6b 01 00 00 js 292f <_PyObject_Realloc+0x1cf>
return _PyMem_Raw.realloc(_PyMem_Raw.ctx, ptr, new_size);
27c4: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 27cb <_PyObject_Realloc+0x6b>
}
27cb: 48 83 c4 18 add $0x18,%rsp
return _PyMem_Raw.realloc(_PyMem_Raw.ctx, ptr, new_size);
27cf: 48 89 ee mov %rbp,%rsi
}
27d2: 5b pop %rbx
27d3: 5d pop %rbp
27d4: 41 5c pop %r12
27d6: 41 5d pop %r13
27d8: 41 5e pop %r14
27da: 41 5f pop %r15
return _PyMem_Raw.realloc(_PyMem_Raw.ctx, ptr, new_size);
27dc: ff 25 00 00 00 00 jmpq *0x0(%rip) # 27e2 <_PyObject_Realloc+0x82>
27e2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
size = INDEX2SIZE(pool->szidx);
27e8: 41 8b 44 24 24 mov 0x24(%r12),%eax
27ed: 8d 58 01 lea 0x1(%rax),%ebx
27f0: c1 e3 04 shl $0x4,%ebx
if (nbytes <= size) {
27f3: 48 39 da cmp %rbx,%rdx
27f6: 0f 87 3c 02 00 00 ja 2a38 <_PyObject_Realloc+0x2d8>
if (4 * nbytes > 3 * size) {
27fc: 48 8d 0c 95 00 00 00 lea 0x0(,%rdx,4),%rcx
2803: 00
2804: 48 8d 04 5b lea (%rbx,%rbx,2),%rax
2808: 49 89 ee mov %rbp,%r14
280b: 48 39 c1 cmp %rax,%rcx
280e: 0f 87 1e 01 00 00 ja 2932 <_PyObject_Realloc+0x1d2>
if (nbytes == 0) {
2814: 31 db xor %ebx,%ebx
2816: 48 85 d2 test %rdx,%rdx
2819: 0f 85 29 01 00 00 jne 2948 <_PyObject_Realloc+0x1e8>
return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);
281f: 48 89 d6 mov %rdx,%rsi
2822: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 2829 <_PyObject_Realloc+0xc9>
2829: ff 15 00 00 00 00 callq *0x0(%rip) # 282f <_PyObject_Realloc+0xcf>
282f: 49 89 c6 mov %rax,%r14
if (ptr != NULL) {
2832: 48 85 c0 test %rax,%rax
2835: 0f 84 f4 00 00 00 je 292f <_PyObject_Realloc+0x1cf>
_Py_AllocatedBlocks++;
283b: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 2842 <_PyObject_Realloc+0xe2>
if (bp != NULL) {
2842: 44 8b 3d 00 00 00 00 mov 0x0(%rip),%r15d # 2849 <_PyObject_Realloc+0xe9>
2849: e9 4d 01 00 00 jmpq 299b <_PyObject_Realloc+0x23b>
284e: 66 90 xchg %ax,%ax
if (usable_arenas == NULL) {
2850: 4c 8b 05 00 00 00 00 mov 0x0(%rip),%r8 # 2857 <_PyObject_Realloc+0xf7>
2857: 4d 85 c0 test %r8,%r8
285a: 0f 84 fe 04 00 00 je 2d5e <_PyObject_Realloc+0x5fe>
if (nfp2lasta[usable_arenas->nfreepools] == usable_arenas) {
2860: 41 8b 50 10 mov 0x10(%r8),%edx
2864: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 286b <_PyObject_Realloc+0x10b>
286b: 48 8b 04 d6 mov (%rsi,%rdx,8),%rax
286f: 48 89 d7 mov %rdx,%rdi
2872: 49 39 c0 cmp %rax,%r8
2875: 0f 84 23 05 00 00 je 2d9e <_PyObject_Realloc+0x63e>
if (usable_arenas->nfreepools > 1) {
287b: 49 8b 50 18 mov 0x18(%r8),%rdx
287f: 8d 47 ff lea -0x1(%rdi),%eax
2882: 83 ff 01 cmp $0x1,%edi
2885: 0f 86 4f 04 00 00 jbe 2cda <_PyObject_Realloc+0x57a>
nfp2lasta[usable_arenas->nfreepools - 1] = usable_arenas;
288b: 89 c7 mov %eax,%edi
288d: 4c 89 04 fe mov %r8,(%rsi,%rdi,8)
if (pool != NULL) {
2891: 48 85 d2 test %rdx,%rdx
2894: 0f 84 25 05 00 00 je 2dbf <_PyObject_Realloc+0x65f>
usable_arenas->freepools = pool->nextpool;
289a: 48 8b 72 10 mov 0x10(%rdx),%rsi
--usable_arenas->nfreepools;
289e: 41 89 40 10 mov %eax,0x10(%r8)
usable_arenas->freepools = pool->nextpool;
28a2: 49 89 70 18 mov %rsi,0x18(%r8)
if (usable_arenas->nfreepools == 0) {
28a6: 8b 72 24 mov 0x24(%rdx),%esi
next = usedpools[size + size]; /* == prev */
28a9: 4a 8b 04 f1 mov (%rcx,%r14,8),%rax
pool->prevpool = next;
28ad: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 28b4 <_PyObject_Realloc+0x154>
pool->nextpool = next;
28b4: 48 89 04 24 mov %rax,(%rsp)
28b8: f3 0f 7e 04 24 movq (%rsp),%xmm0
28bd: 48 8d 79 01 lea 0x1(%rcx),%rdi
next->nextpool = pool;
28c1: 48 89 14 24 mov %rdx,(%rsp)
pool->nextpool = next;
28c5: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
28c9: 0f 11 42 10 movups %xmm0,0x10(%rdx)
next->nextpool = pool;
28cd: f3 0f 7e 04 24 movq (%rsp),%xmm0
28d2: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
28d6: 0f 11 40 10 movups %xmm0,0x10(%rax)
pool->ref.count = 1;
28da: c7 02 01 00 00 00 movl $0x1,(%rdx)
if (pool->szidx == size) {
28e0: 41 39 f5 cmp %esi,%r13d
28e3: 0f 84 5e 04 00 00 je 2d47 <_PyObject_Realloc+0x5e7>
pool->szidx = size;
28e9: 44 89 6a 24 mov %r13d,0x24(%rdx)
size = INDEX2SIZE(size);
28ed: 41 83 c5 01 add $0x1,%r13d
bp = (block *)pool + POOL_OVERHEAD;
28f1: 4c 8d 72 30 lea 0x30(%rdx),%r14
pool->maxnextoffset = POOL_SIZE - size;
28f5: be 00 10 00 00 mov $0x1000,%esi
size = INDEX2SIZE(size);
28fa: 44 89 e8 mov %r13d,%eax
pool->nextoffset = POOL_OVERHEAD + (size << 1);
28fd: 41 c1 e5 05 shl $0x5,%r13d
_Py_AllocatedBlocks++;
2901: 48 89 3d 00 00 00 00 mov %rdi,0x0(%rip) # 2908 <_PyObject_Realloc+0x1a8>
size = INDEX2SIZE(size);
2908: c1 e0 04 shl $0x4,%eax
pool->nextoffset = POOL_OVERHEAD + (size << 1);
290b: 41 83 c5 30 add $0x30,%r13d
pool->maxnextoffset = POOL_SIZE - size;
290f: 29 c6 sub %eax,%esi
pool->freeblock = bp + size;
2911: 4c 01 f0 add %r14,%rax
pool->nextoffset = POOL_OVERHEAD + (size << 1);
2914: 44 89 6a 28 mov %r13d,0x28(%rdx)
pool->maxnextoffset = POOL_SIZE - size;
2918: 89 72 2c mov %esi,0x2c(%rdx)
pool->freeblock = bp + size;
291b: 48 89 42 08 mov %rax,0x8(%rdx)
*(block **)(pool->freeblock) = NULL;
291f: 48 c7 00 00 00 00 00 movq $0x0,(%rax)
if (bp != NULL) {
2926: 4d 85 f6 test %r14,%r14
2929: 0f 85 13 ff ff ff jne 2842 <_PyObject_Realloc+0xe2>
return NULL;
292f: 45 31 f6 xor %r14d,%r14d
}
2932: 48 83 c4 18 add $0x18,%rsp
2936: 4c 89 f0 mov %r14,%rax
2939: 5b pop %rbx
293a: 5d pop %rbp
293b: 41 5c pop %r12
293d: 41 5d pop %r13
293f: 41 5e pop %r14
2941: 41 5f pop %r15
2943: c3 retq
2944: 0f 1f 40 00 nopl 0x0(%rax)
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
2948: 48 89 d3 mov %rdx,%rbx
294b: 48 81 fa 00 02 00 00 cmp $0x200,%rdx
2952: 0f 87 c7 fe ff ff ja 281f <_PyObject_Realloc+0xbf>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
2958: 44 8d 6a ff lea -0x1(%rdx),%r13d
pool = usedpools[size + size];
295c: 48 8d 0d 00 00 00 00 lea 0x0(%rip),%rcx # 2963 <_PyObject_Realloc+0x203>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
2963: 41 c1 ed 04 shr $0x4,%r13d
pool = usedpools[size + size];
2967: 47 8d 74 2d 00 lea 0x0(%r13,%r13,1),%r14d
296c: 4a 8b 04 f1 mov (%rcx,%r14,8),%rax
if (LIKELY(pool != pool->nextpool)) {
2970: 48 8b 70 10 mov 0x10(%rax),%rsi
2974: 48 39 f0 cmp %rsi,%rax
2977: 0f 84 d3 fe ff ff je 2850 <_PyObject_Realloc+0xf0>
bp = pool->freeblock;
297d: 4c 8b 70 08 mov 0x8(%rax),%r14
++pool->ref.count;
2981: 83 00 01 addl $0x1,(%rax)
if (LIKELY((pool->freeblock = *(block **)bp) != NULL)) {
2984: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 298b <_PyObject_Realloc+0x22b>
298b: 49 8b 16 mov (%r14),%rdx
298e: 48 89 50 08 mov %rdx,0x8(%rax)
2992: 48 85 d2 test %rdx,%rdx
2995: 0f 84 c5 01 00 00 je 2b60 <_PyObject_Realloc+0x400>
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
299b: 48 89 da mov %rbx,%rdx
299e: 48 89 ee mov %rbp,%rsi
29a1: 4c 89 f7 mov %r14,%rdi
29a4: 48 89 0c 24 mov %rcx,(%rsp)
29a8: e8 00 00 00 00 callq 29ad <_PyObject_Realloc+0x24d>
_Py_AllocatedBlocks--;
29ad: 48 8b 0c 24 mov (%rsp),%rcx
uint arenaindex = *((volatile uint *)&pool->arenaindex);
29b1: 41 8b 44 24 20 mov 0x20(%r12),%eax
_Py_AllocatedBlocks--;
29b6: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 29bd <_PyObject_Realloc+0x25d>
(uintptr_t)p - arenas[arenaindex].address < ARENA_SIZE &&
29bd: 44 39 f8 cmp %r15d,%eax
29c0: 0f 82 92 00 00 00 jb 2a58 <_PyObject_Realloc+0x2f8>
_PyMem_Raw.free(_PyMem_Raw.ctx, ptr);
29c6: 48 89 ee mov %rbp,%rsi
29c9: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 29d0 <_PyObject_Realloc+0x270>
29d0: ff 15 00 00 00 00 callq *0x0(%rip) # 29d6 <_PyObject_Realloc+0x276>
29d6: e9 57 ff ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
29db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
29e0: 48 8d 42 ff lea -0x1(%rdx),%rax
29e4: 48 3d ff 01 00 00 cmp $0x1ff,%rax
29ea: 0f 87 a0 01 00 00 ja 2b90 <_PyObject_Realloc+0x430>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
29f0: 8d 5a ff lea -0x1(%rdx),%ebx
pool = usedpools[size + size];
29f3: 48 8d 0d 00 00 00 00 lea 0x0(%rip),%rcx # 29fa <_PyObject_Realloc+0x29a>
size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT;
29fa: c1 eb 04 shr $0x4,%ebx
pool = usedpools[size + size];
29fd: 8d 2c 1b lea (%rbx,%rbx,1),%ebp
2a00: 48 8b 04 e9 mov (%rcx,%rbp,8),%rax
if (LIKELY(pool != pool->nextpool)) {
2a04: 48 8b 70 10 mov 0x10(%rax),%rsi
2a08: 48 39 f0 cmp %rsi,%rax
2a0b: 0f 84 07 02 00 00 je 2c18 <_PyObject_Realloc+0x4b8>
bp = pool->freeblock;
2a11: 4c 8b 70 08 mov 0x8(%rax),%r14
++pool->ref.count;
2a15: 83 00 01 addl $0x1,(%rax)
if (LIKELY((pool->freeblock = *(block **)bp) != NULL)) {
2a18: 49 8b 16 mov (%r14),%rdx
2a1b: 48 89 50 08 mov %rdx,0x8(%rax)
2a1f: 48 85 d2 test %rdx,%rdx
2a22: 0f 84 f3 02 00 00 je 2d1b <_PyObject_Realloc+0x5bb>
_Py_AllocatedBlocks++;
2a28: 48 83 05 00 00 00 00 addq $0x1,0x0(%rip) # 2a30 <_PyObject_Realloc+0x2d0>
2a2f: 01
2a30: e9 fd fe ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
2a35: 0f 1f 00 nopl (%rax)
if (UNLIKELY(nbytes > SMALL_REQUEST_THRESHOLD)) {
2a38: 48 81 fa 00 02 00 00 cmp $0x200,%rdx
2a3f: 0f 86 13 ff ff ff jbe 2958 <_PyObject_Realloc+0x1f8>
if (size > (size_t)PY_SSIZE_T_MAX)
2a45: 48 85 d2 test %rdx,%rdx
2a48: 0f 88 e1 fe ff ff js 292f <_PyObject_Realloc+0x1cf>
2a4e: e9 cc fd ff ff jmpq 281f <_PyObject_Realloc+0xbf>
2a53: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
(uintptr_t)p - arenas[arenaindex].address < ARENA_SIZE &&
2a58: 48 8b 0d 00 00 00 00 mov 0x0(%rip),%rcx # 2a5f <_PyObject_Realloc+0x2ff>
2a5f: 48 8d 04 40 lea (%rax,%rax,2),%rax
2a63: 48 89 ea mov %rbp,%rdx
2a66: 48 c1 e0 04 shl $0x4,%rax
2a6a: 48 8b 04 01 mov (%rcx,%rax,1),%rax
2a6e: 48 29 c2 sub %rax,%rdx
2a71: 48 81 fa ff ff 03 00 cmp $0x3ffff,%rdx
2a78: 0f 87 48 ff ff ff ja 29c6 <_PyObject_Realloc+0x266>
2a7e: 48 85 c0 test %rax,%rax
2a81: 0f 84 3f ff ff ff je 29c6 <_PyObject_Realloc+0x266>
*(block **)p = lastfree = pool->freeblock;
2a87: 49 8b 44 24 08 mov 0x8(%r12),%rax
2a8c: 48 89 45 00 mov %rax,0x0(%rbp)
pool->freeblock = (block *)p;
2a90: 49 89 6c 24 08 mov %rbp,0x8(%r12)
if (UNLIKELY(!lastfree)) {
2a95: 48 85 c0 test %rax,%rax
2a98: 0f 84 22 01 00 00 je 2bc0 <_PyObject_Realloc+0x460>
if (LIKELY(--pool->ref.count != 0)) {
2a9e: 41 83 2c 24 01 subl $0x1,(%r12)
2aa3: 0f 85 89 fe ff ff jne 2932 <_PyObject_Realloc+0x1d2>
next = pool->nextpool;
2aa9: 49 8b 54 24 10 mov 0x10(%r12),%rdx
prev = pool->prevpool;
2aae: 49 8b 44 24 18 mov 0x18(%r12),%rax
struct arena_object* lastnf = nfp2lasta[nf];
2ab3: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 2aba <_PyObject_Realloc+0x35a>
next->prevpool = prev;
2aba: 48 89 42 18 mov %rax,0x18(%rdx)
prev->nextpool = next;
2abe: 48 89 50 10 mov %rdx,0x10(%rax)
ao = &arenas[pool->arenaindex];
2ac2: 41 8b 44 24 20 mov 0x20(%r12),%eax
2ac7: 48 8d 1c 40 lea (%rax,%rax,2),%rbx
2acb: 48 c1 e3 04 shl $0x4,%rbx
2acf: 48 01 cb add %rcx,%rbx
nf = ao->nfreepools;
2ad2: 8b 4b 10 mov 0x10(%rbx),%ecx
pool->nextpool = ao->freepools;
2ad5: 48 8b 43 18 mov 0x18(%rbx),%rax
struct arena_object* lastnf = nfp2lasta[nf];
2ad9: 48 8b 14 ce mov (%rsi,%rcx,8),%rdx
pool->nextpool = ao->freepools;
2add: 49 89 44 24 10 mov %rax,0x10(%r12)
nf = ao->nfreepools;
2ae2: 48 89 c8 mov %rcx,%rax
ao->freepools = pool;
2ae5: 4c 89 63 18 mov %r12,0x18(%rbx)
if (lastnf == ao) { /* it is the rightmost */
2ae9: 48 39 d3 cmp %rdx,%rbx
2aec: 0f 84 d1 03 00 00 je 2ec3 <_PyObject_Realloc+0x763>
ao->nfreepools = ++nf;
2af2: 83 c0 01 add $0x1,%eax
2af5: 89 43 10 mov %eax,0x10(%rbx)
if (nf == ao->ntotalpools && ao->nextarena != NULL) {
2af8: 3b 43 14 cmp 0x14(%rbx),%eax
2afb: 0f 84 5c 03 00 00 je 2e5d <_PyObject_Realloc+0x6fd>
if (nf == 1) {
2b01: 83 f8 01 cmp $0x1,%eax
2b04: 0f 84 42 04 00 00 je 2f4c <_PyObject_Realloc+0x7ec>
if (nfp2lasta[nf] == NULL) {
2b0a: 48 83 3c c6 00 cmpq $0x0,(%rsi,%rax,8)
2b0f: 0f 84 2e 04 00 00 je 2f43 <_PyObject_Realloc+0x7e3>
if (ao == lastnf) {
2b15: 48 39 d3 cmp %rdx,%rbx
2b18: 0f 84 14 fe ff ff je 2932 <_PyObject_Realloc+0x1d2>
if (ao->prevarena != NULL) {
2b1e: 48 8b 43 28 mov 0x28(%rbx),%rax
2b22: 48 8b 4b 20 mov 0x20(%rbx),%rcx
2b26: 48 85 c0 test %rax,%rax
2b29: 0f 84 a1 04 00 00 je 2fd0 <_PyObject_Realloc+0x870>
ao->prevarena->nextarena = ao->nextarena;
2b2f: 48 89 48 20 mov %rcx,0x20(%rax)
2b33: 48 8b 4b 20 mov 0x20(%rbx),%rcx
ao->nextarena->prevarena = ao->prevarena;
2b37: 48 89 41 28 mov %rax,0x28(%rcx)
ao->nextarena = lastnf->nextarena;
2b3b: 48 8b 42 20 mov 0x20(%rdx),%rax
ao->prevarena = lastnf;
2b3f: 48 89 53 28 mov %rdx,0x28(%rbx)
ao->nextarena = lastnf->nextarena;
2b43: 48 89 43 20 mov %rax,0x20(%rbx)
if (ao->nextarena != NULL) {
2b47: 48 85 c0 test %rax,%rax
2b4a: 74 04 je 2b50 <_PyObject_Realloc+0x3f0>
ao->nextarena->prevarena = ao;
2b4c: 48 89 58 28 mov %rbx,0x28(%rax)
lastnf->nextarena = ao;
2b50: 48 89 5a 20 mov %rbx,0x20(%rdx)
goto success;
2b54: e9 d9 fd ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
2b59: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
if (pool->nextoffset <= pool->maxnextoffset) {
2b60: 8b 50 28 mov 0x28(%rax),%edx
2b63: 3b 50 2c cmp 0x2c(%rax),%edx
2b66: 0f 87 94 00 00 00 ja 2c00 <_PyObject_Realloc+0x4a0>
pool->nextoffset += INDEX2SIZE(size);
2b6c: 41 83 c5 01 add $0x1,%r13d
pool->nextoffset;
2b70: 89 d6 mov %edx,%esi
pool->nextoffset += INDEX2SIZE(size);
2b72: 41 c1 e5 04 shl $0x4,%r13d
pool->freeblock = (block*)pool +
2b76: 48 01 c6 add %rax,%rsi
pool->nextoffset += INDEX2SIZE(size);
2b79: 44 01 ea add %r13d,%edx
pool->freeblock = (block*)pool +
2b7c: 48 89 70 08 mov %rsi,0x8(%rax)
pool->nextoffset += INDEX2SIZE(size);
2b80: 89 50 28 mov %edx,0x28(%rax)
*(block **)(pool->freeblock) = NULL;
2b83: 48 c7 06 00 00 00 00 movq $0x0,(%rsi)
goto success;
2b8a: e9 0c fe ff ff jmpq 299b <_PyObject_Realloc+0x23b>
2b8f: 90 nop
if (size > (size_t)PY_SSIZE_T_MAX)
2b90: 48 85 d2 test %rdx,%rdx
2b93: 0f 88 96 fd ff ff js 292f <_PyObject_Realloc+0x1cf>
return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);
2b99: 48 89 d6 mov %rdx,%rsi
2b9c: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 2ba3 <_PyObject_Realloc+0x443>
2ba3: ff 15 00 00 00 00 callq *0x0(%rip) # 2ba9 <_PyObject_Realloc+0x449>
2ba9: 49 89 c6 mov %rax,%r14
if (ptr != NULL) {
2bac: 48 85 c0 test %rax,%rax
2baf: 0f 85 73 fe ff ff jne 2a28 <_PyObject_Realloc+0x2c8>
2bb5: e9 78 fd ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
2bba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
next = usedpools[size + size];
2bc0: 41 8b 44 24 24 mov 0x24(%r12),%eax
2bc5: 48 8d 15 00 00 00 00 lea 0x0(%rip),%rdx # 2bcc <_PyObject_Realloc+0x46c>
--pool->ref.count;
2bcc: 41 83 2c 24 01 subl $0x1,(%r12)
next = usedpools[size + size];
2bd1: 01 c0 add %eax,%eax
2bd3: 48 8b 04 c2 mov (%rdx,%rax,8),%rax
prev = next->prevpool;
2bd7: 48 8b 50 18 mov 0x18(%rax),%rdx
pool->nextpool = next;
2bdb: 48 89 04 24 mov %rax,(%rsp)
2bdf: f3 0f 7e 04 24 movq (%rsp),%xmm0
2be4: 48 89 14 24 mov %rdx,(%rsp)
2be8: 0f 16 04 24 movhps (%rsp),%xmm0
2bec: 41 0f 29 44 24 10 movaps %xmm0,0x10(%r12)
next->prevpool = pool;
2bf2: 4c 89 60 18 mov %r12,0x18(%rax)
prev->nextpool = pool;
2bf6: 4c 89 62 10 mov %r12,0x10(%rdx)
goto success;
2bfa: e9 33 fd ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
2bff: 90 nop
pool = pool->prevpool;
2c00: 48 8b 40 18 mov 0x18(%rax),%rax
next->prevpool = pool;
2c04: 48 89 46 18 mov %rax,0x18(%rsi)
pool->nextpool = next;
2c08: 48 89 70 10 mov %rsi,0x10(%rax)
goto success;
2c0c: e9 8a fd ff ff jmpq 299b <_PyObject_Realloc+0x23b>
2c11: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
if (usable_arenas == NULL) {
2c18: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 2c1f <_PyObject_Realloc+0x4bf>
2c1f: 48 85 ff test %rdi,%rdi
2c22: 0f 84 ca 02 00 00 je 2ef2 <_PyObject_Realloc+0x792>
if (nfp2lasta[usable_arenas->nfreepools] == usable_arenas) {
2c28: 44 8b 47 10 mov 0x10(%rdi),%r8d
2c2c: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 2c33 <_PyObject_Realloc+0x4d3>
2c33: 4a 8b 04 c6 mov (%rsi,%r8,8),%rax
2c37: 4c 89 c2 mov %r8,%rdx
2c3a: 48 39 c7 cmp %rax,%rdi
2c3d: 0f 84 f0 02 00 00 je 2f33 <_PyObject_Realloc+0x7d3>
if (usable_arenas->nfreepools > 1) {
2c43: 48 8b 47 18 mov 0x18(%rdi),%rax
2c47: 44 8d 42 ff lea -0x1(%rdx),%r8d
2c4b: 83 fa 01 cmp $0x1,%edx
2c4e: 0f 86 ca 01 00 00 jbe 2e1e <_PyObject_Realloc+0x6be>
nfp2lasta[usable_arenas->nfreepools - 1] = usable_arenas;
2c54: 44 89 c2 mov %r8d,%edx
2c57: 48 89 3c d6 mov %rdi,(%rsi,%rdx,8)
if (pool != NULL) {
2c5b: 48 85 c0 test %rax,%rax
2c5e: 0f 84 25 03 00 00 je 2f89 <_PyObject_Realloc+0x829>
usable_arenas->freepools = pool->nextpool;
2c64: 48 8b 50 10 mov 0x10(%rax),%rdx
--usable_arenas->nfreepools;
2c68: 44 89 47 10 mov %r8d,0x10(%rdi)
usable_arenas->freepools = pool->nextpool;
2c6c: 48 89 57 18 mov %rdx,0x18(%rdi)
next = usedpools[size + size]; /* == prev */
2c70: 48 8b 14 e9 mov (%rcx,%rbp,8),%rdx
pool->nextpool = next;
2c74: 48 89 14 24 mov %rdx,(%rsp)
2c78: f3 0f 7e 04 24 movq (%rsp),%xmm0
next->nextpool = pool;
2c7d: 48 89 04 24 mov %rax,(%rsp)
pool->nextpool = next;
2c81: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
2c85: 0f 11 40 10 movups %xmm0,0x10(%rax)
next->nextpool = pool;
2c89: f3 0f 7e 04 24 movq (%rsp),%xmm0
2c8e: 66 0f 6c c0 punpcklqdq %xmm0,%xmm0
2c92: 0f 11 42 10 movups %xmm0,0x10(%rdx)
pool->ref.count = 1;
2c96: c7 00 01 00 00 00 movl $0x1,(%rax)
if (pool->szidx == size) {
2c9c: 3b 58 24 cmp 0x24(%rax),%ebx
2c9f: 0f 84 3d 02 00 00 je 2ee2 <_PyObject_Realloc+0x782>
pool->szidx = size;
2ca5: 89 58 24 mov %ebx,0x24(%rax)
size = INDEX2SIZE(size);
2ca8: 83 c3 01 add $0x1,%ebx
bp = (block *)pool + POOL_OVERHEAD;
2cab: 4c 8d 70 30 lea 0x30(%rax),%r14
size = INDEX2SIZE(size);
2caf: 89 da mov %ebx,%edx
pool->nextoffset = POOL_OVERHEAD + (size << 1);
2cb1: c1 e3 05 shl $0x5,%ebx
2cb4: 8d 4b 30 lea 0x30(%rbx),%ecx
size = INDEX2SIZE(size);
2cb7: c1 e2 04 shl $0x4,%edx
pool->nextoffset = POOL_OVERHEAD + (size << 1);
2cba: 89 48 28 mov %ecx,0x28(%rax)
pool->maxnextoffset = POOL_SIZE - size;
2cbd: b9 00 10 00 00 mov $0x1000,%ecx
2cc2: 29 d1 sub %edx,%ecx
pool->freeblock = bp + size;
2cc4: 4c 01 f2 add %r14,%rdx
pool->maxnextoffset = POOL_SIZE - size;
2cc7: 89 48 2c mov %ecx,0x2c(%rax)
pool->freeblock = bp + size;
2cca: 48 89 50 08 mov %rdx,0x8(%rax)
*(block **)(pool->freeblock) = NULL;
2cce: 48 c7 02 00 00 00 00 movq $0x0,(%rdx)
goto success;
2cd5: e9 4e fd ff ff jmpq 2a28 <_PyObject_Realloc+0x2c8>
if (pool != NULL) {
2cda: 48 85 d2 test %rdx,%rdx
2cdd: 0f 84 dc 00 00 00 je 2dbf <_PyObject_Realloc+0x65f>
usable_arenas->freepools = pool->nextpool;
2ce3: 48 8b 72 10 mov 0x10(%rdx),%rsi
--usable_arenas->nfreepools;
2ce7: 41 89 40 10 mov %eax,0x10(%r8)
usable_arenas->freepools = pool->nextpool;
2ceb: 49 89 70 18 mov %rsi,0x18(%r8)
if (usable_arenas->nfreepools == 0) {
2cef: 85 c0 test %eax,%eax
2cf1: 0f 85 af fb ff ff jne 28a6 <_PyObject_Realloc+0x146>
usable_arenas = usable_arenas->nextarena;
2cf7: 49 8b 40 20 mov 0x20(%r8),%rax
2cfb: 8b 72 24 mov 0x24(%rdx),%esi
2cfe: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2d05 <_PyObject_Realloc+0x5a5>
if (usable_arenas != NULL) {
2d05: 48 85 c0 test %rax,%rax
2d08: 0f 84 9b fb ff ff je 28a9 <_PyObject_Realloc+0x149>
usable_arenas->prevarena = NULL;
2d0e: 48 c7 40 28 00 00 00 movq $0x0,0x28(%rax)
2d15: 00
2d16: e9 8e fb ff ff jmpq 28a9 <_PyObject_Realloc+0x149>
if (pool->nextoffset <= pool->maxnextoffset) {
2d1b: 8b 50 28 mov 0x28(%rax),%edx
2d1e: 3b 50 2c cmp 0x2c(%rax),%edx
2d21: 0f 87 87 00 00 00 ja 2dae <_PyObject_Realloc+0x64e>
pool->nextoffset += INDEX2SIZE(size);
2d27: 83 c3 01 add $0x1,%ebx
pool->nextoffset;
2d2a: 89 d1 mov %edx,%ecx
pool->nextoffset += INDEX2SIZE(size);
2d2c: c1 e3 04 shl $0x4,%ebx
pool->freeblock = (block*)pool +
2d2f: 48 01 c1 add %rax,%rcx
pool->nextoffset += INDEX2SIZE(size);
2d32: 01 da add %ebx,%edx
pool->freeblock = (block*)pool +
2d34: 48 89 48 08 mov %rcx,0x8(%rax)
pool->nextoffset += INDEX2SIZE(size);
2d38: 89 50 28 mov %edx,0x28(%rax)
*(block **)(pool->freeblock) = NULL;
2d3b: 48 c7 01 00 00 00 00 movq $0x0,(%rcx)
goto success;
2d42: e9 e1 fc ff ff jmpq 2a28 <_PyObject_Realloc+0x2c8>
bp = pool->freeblock;
2d47: 4c 8b 72 08 mov 0x8(%rdx),%r14
pool->freeblock = *(block **)bp;
2d4b: 44 8b 3d 00 00 00 00 mov 0x0(%rip),%r15d # 2d52 <_PyObject_Realloc+0x5f2>
2d52: 49 8b 06 mov (%r14),%rax
2d55: 48 89 42 08 mov %rax,0x8(%rdx)
goto success;
2d59: e9 3d fc ff ff jmpq 299b <_PyObject_Realloc+0x23b>
2d5e: 48 89 14 24 mov %rdx,(%rsp)
usable_arenas = new_arena();
2d62: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
2d67: e8 04 e6 ff ff callq 1370 <new_arena>
if (usable_arenas == NULL) {
2d6c: 48 8b 14 24 mov (%rsp),%rdx
2d70: 48 85 c0 test %rax,%rax
usable_arenas = new_arena();
2d73: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2d7a <_PyObject_Realloc+0x61a>
if (usable_arenas == NULL) {
2d7a: 0f 84 9f fa ff ff je 281f <_PyObject_Realloc+0xbf>
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2d80: 8b 50 10 mov 0x10(%rax),%edx
2d83: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 2d8a <_PyObject_Realloc+0x62a>
usable_arenas->nextarena =
2d8a: 66 0f ef c0 pxor %xmm0,%xmm0
2d8e: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
2d93: 0f 11 40 20 movups %xmm0,0x20(%rax)
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2d97: 48 89 04 d6 mov %rax,(%rsi,%rdx,8)
2d9b: 48 89 d7 mov %rdx,%rdi
nfp2lasta[usable_arenas->nfreepools] = NULL;
2d9e: 48 c7 04 d6 00 00 00 movq $0x0,(%rsi,%rdx,8)
2da5: 00
2da6: 49 89 c0 mov %rax,%r8
2da9: e9 cd fa ff ff jmpq 287b <_PyObject_Realloc+0x11b>
pool = pool->prevpool;
2dae: 48 8b 40 18 mov 0x18(%rax),%rax
next->prevpool = pool;
2db2: 48 89 46 18 mov %rax,0x18(%rsi)
pool->nextpool = next;
2db6: 48 89 70 10 mov %rsi,0x10(%rax)
goto success;
2dba: e9 69 fc ff ff jmpq 2a28 <_PyObject_Realloc+0x2c8>
pool->arenaindex = (uint)(usable_arenas - arenas);
2dbf: 4c 89 c6 mov %r8,%rsi
2dc2: 48 2b 35 00 00 00 00 sub 0x0(%rip),%rsi # 2dc9 <_PyObject_Realloc+0x669>
pool = (poolp)usable_arenas->pool_address;
2dc9: 49 8b 50 08 mov 0x8(%r8),%rdx
pool->arenaindex = (uint)(usable_arenas - arenas);
2dcd: 48 bf ab aa aa aa aa movabs $0xaaaaaaaaaaaaaaab,%rdi
2dd4: aa aa aa
2dd7: 48 c1 fe 04 sar $0x4,%rsi
2ddb: 48 0f af f7 imul %rdi,%rsi
pool->szidx = DUMMY_SIZE_IDX;
2ddf: c7 42 24 ff ff 00 00 movl $0xffff,0x24(%rdx)
pool->arenaindex = (uint)(usable_arenas - arenas);
2de6: 89 72 20 mov %esi,0x20(%rdx)
usable_arenas->pool_address += POOL_SIZE;
2de9: 48 8d b2 00 10 00 00 lea 0x1000(%rdx),%rsi
2df0: 49 89 70 08 mov %rsi,0x8(%r8)
if (usable_arenas->nfreepools == 0) {
2df4: be ff ff 00 00 mov $0xffff,%esi
--usable_arenas->nfreepools;
2df9: 41 89 40 10 mov %eax,0x10(%r8)
if (usable_arenas->nfreepools == 0) {
2dfd: 85 c0 test %eax,%eax
2dff: 0f 85 a4 fa ff ff jne 28a9 <_PyObject_Realloc+0x149>
usable_arenas = usable_arenas->nextarena;
2e05: 49 8b 40 20 mov 0x20(%r8),%rax
2e09: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2e10 <_PyObject_Realloc+0x6b0>
if (usable_arenas != NULL) {
2e10: 48 85 c0 test %rax,%rax
2e13: 0f 85 f5 fe ff ff jne 2d0e <_PyObject_Realloc+0x5ae>
2e19: e9 8b fa ff ff jmpq 28a9 <_PyObject_Realloc+0x149>
if (pool != NULL) {
2e1e: 48 85 c0 test %rax,%rax
2e21: 0f 84 62 01 00 00 je 2f89 <_PyObject_Realloc+0x829>
usable_arenas->freepools = pool->nextpool;
2e27: 48 8b 50 10 mov 0x10(%rax),%rdx
--usable_arenas->nfreepools;
2e2b: 44 89 47 10 mov %r8d,0x10(%rdi)
usable_arenas->freepools = pool->nextpool;
2e2f: 48 89 57 18 mov %rdx,0x18(%rdi)
if (usable_arenas->nfreepools == 0) {
2e33: 45 85 c0 test %r8d,%r8d
2e36: 0f 85 34 fe ff ff jne 2c70 <_PyObject_Realloc+0x510>
usable_arenas = usable_arenas->nextarena;
2e3c: 48 8b 57 20 mov 0x20(%rdi),%rdx
2e40: 48 89 15 00 00 00 00 mov %rdx,0x0(%rip) # 2e47 <_PyObject_Realloc+0x6e7>
if (usable_arenas != NULL) {
2e47: 48 85 d2 test %rdx,%rdx
2e4a: 0f 84 20 fe ff ff je 2c70 <_PyObject_Realloc+0x510>
usable_arenas->prevarena = NULL;
2e50: 48 c7 42 28 00 00 00 movq $0x0,0x28(%rdx)
2e57: 00
2e58: e9 13 fe ff ff jmpq 2c70 <_PyObject_Realloc+0x510>
if (nf == ao->ntotalpools && ao->nextarena != NULL) {
2e5d: 48 8b 4b 20 mov 0x20(%rbx),%rcx
2e61: 48 85 c9 test %rcx,%rcx
2e64: 0f 84 97 fc ff ff je 2b01 <_PyObject_Realloc+0x3a1>
if (ao->prevarena == NULL) {
2e6a: 48 8b 43 28 mov 0x28(%rbx),%rax
2e6e: 48 85 c0 test %rax,%rax
2e71: 0f 84 65 01 00 00 je 2fdc <_PyObject_Realloc+0x87c>
ao->prevarena->nextarena =
2e77: 48 89 48 20 mov %rcx,0x20(%rax)
if (ao->nextarena != NULL) {
2e7b: 48 8b 4b 20 mov 0x20(%rbx),%rcx
2e7f: 48 85 c9 test %rcx,%rcx
2e82: 74 04 je 2e88 <_PyObject_Realloc+0x728>
ao->nextarena->prevarena =
2e84: 48 89 41 28 mov %rax,0x28(%rcx)
ao->nextarena = unused_arena_objects;
2e88: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 2e8f <_PyObject_Realloc+0x72f>
_PyObject_Arena.free(_PyObject_Arena.ctx,
2e8f: ba 00 00 04 00 mov $0x40000,%edx
unused_arena_objects = ao;
2e94: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 2e9b <_PyObject_Realloc+0x73b>
_PyObject_Arena.free(_PyObject_Arena.ctx,
2e9b: 48 8b 33 mov (%rbx),%rsi
2e9e: 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # 2ea5 <_PyObject_Realloc+0x745>
ao->nextarena = unused_arena_objects;
2ea5: 48 89 43 20 mov %rax,0x20(%rbx)
_PyObject_Arena.free(_PyObject_Arena.ctx,
2ea9: ff 15 00 00 00 00 callq *0x0(%rip) # 2eaf <_PyObject_Realloc+0x74f>
ao->address = 0; /* mark unassociated */
2eaf: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
--narenas_currently_allocated;
2eb6: 48 83 2d 00 00 00 00 subq $0x1,0x0(%rip) # 2ebe <_PyObject_Realloc+0x75e>
2ebd: 01
goto success;
2ebe: e9 6f fa ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
struct arena_object* p = ao->prevarena;
2ec3: 48 8b 7b 28 mov 0x28(%rbx),%rdi
nfp2lasta[nf] = (p != NULL && p->nfreepools == nf) ? p : NULL;
2ec7: 48 85 ff test %rdi,%rdi
2eca: 74 0d je 2ed9 <_PyObject_Realloc+0x779>
2ecc: 3b 4f 10 cmp 0x10(%rdi),%ecx
2ecf: 41 b8 00 00 00 00 mov $0x0,%r8d
2ed5: 49 0f 45 f8 cmovne %r8,%rdi
2ed9: 48 89 3c ce mov %rdi,(%rsi,%rcx,8)
2edd: e9 10 fc ff ff jmpq 2af2 <_PyObject_Realloc+0x392>
bp = pool->freeblock;
2ee2: 4c 8b 70 08 mov 0x8(%rax),%r14
pool->freeblock = *(block **)bp;
2ee6: 49 8b 16 mov (%r14),%rdx
2ee9: 48 89 50 08 mov %rdx,0x8(%rax)
goto success;
2eed: e9 36 fb ff ff jmpq 2a28 <_PyObject_Realloc+0x2c8>
2ef2: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
2ef7: 48 89 14 24 mov %rdx,(%rsp)
usable_arenas = new_arena();
2efb: e8 70 e4 ff ff callq 1370 <new_arena>
if (usable_arenas == NULL) {
2f00: 48 8b 14 24 mov (%rsp),%rdx
2f04: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
2f09: 48 85 c0 test %rax,%rax
usable_arenas = new_arena();
2f0c: 48 89 05 00 00 00 00 mov %rax,0x0(%rip) # 2f13 <_PyObject_Realloc+0x7b3>
if (usable_arenas == NULL) {
2f13: 0f 84 80 fc ff ff je 2b99 <_PyObject_Realloc+0x439>
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2f19: 44 8b 40 10 mov 0x10(%rax),%r8d
2f1d: 48 8d 35 00 00 00 00 lea 0x0(%rip),%rsi # 2f24 <_PyObject_Realloc+0x7c4>
usable_arenas->nextarena =
2f24: 66 0f ef c0 pxor %xmm0,%xmm0
2f28: 0f 11 40 20 movups %xmm0,0x20(%rax)
nfp2lasta[usable_arenas->nfreepools] = usable_arenas;
2f2c: 4a 89 04 c6 mov %rax,(%rsi,%r8,8)
2f30: 4c 89 c2 mov %r8,%rdx
nfp2lasta[usable_arenas->nfreepools] = NULL;
2f33: 4a c7 04 c6 00 00 00 movq $0x0,(%rsi,%r8,8)
2f3a: 00
2f3b: 48 89 c7 mov %rax,%rdi
2f3e: e9 00 fd ff ff jmpq 2c43 <_PyObject_Realloc+0x4e3>
nfp2lasta[nf] = ao;
2f43: 48 89 1c c6 mov %rbx,(%rsi,%rax,8)
2f47: e9 c9 fb ff ff jmpq 2b15 <_PyObject_Realloc+0x3b5>
ao->nextarena = usable_arenas;
2f4c: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 2f53 <_PyObject_Realloc+0x7f3>
ao->prevarena = NULL;
2f53: 48 c7 43 28 00 00 00 movq $0x0,0x28(%rbx)
2f5a: 00
ao->nextarena = usable_arenas;
2f5b: 48 89 43 20 mov %rax,0x20(%rbx)
if (usable_arenas)
2f5f: 48 85 c0 test %rax,%rax
2f62: 74 04 je 2f68 <_PyObject_Realloc+0x808>
usable_arenas->prevarena = ao;
2f64: 48 89 58 28 mov %rbx,0x28(%rax)
if (nfp2lasta[1] == NULL) {
2f68: 48 83 3d 00 00 00 00 cmpq $0x0,0x0(%rip) # 2f70 <_PyObject_Realloc+0x810>
2f6f: 00
usable_arenas = ao;
2f70: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 2f77 <_PyObject_Realloc+0x817>
if (nfp2lasta[1] == NULL) {
2f77: 0f 85 b5 f9 ff ff jne 2932 <_PyObject_Realloc+0x1d2>
nfp2lasta[1] = ao;
2f7d: 48 89 1d 00 00 00 00 mov %rbx,0x0(%rip) # 2f84 <_PyObject_Realloc+0x824>
2f84: e9 a9 f9 ff ff jmpq 2932 <_PyObject_Realloc+0x1d2>
pool->arenaindex = (uint)(usable_arenas - arenas);
2f89: 48 89 fa mov %rdi,%rdx
2f8c: 48 2b 15 00 00 00 00 sub 0x0(%rip),%rdx # 2f93 <_PyObject_Realloc+0x833>
pool = (poolp)usable_arenas->pool_address;
2f93: 48 8b 47 08 mov 0x8(%rdi),%rax
pool->arenaindex = (uint)(usable_arenas - arenas);
2f97: 48 be ab aa aa aa aa movabs $0xaaaaaaaaaaaaaaab,%rsi
2f9e: aa aa aa
2fa1: 48 c1 fa 04 sar $0x4,%rdx
2fa5: 48 0f af d6 imul %rsi,%rdx
pool->szidx = DUMMY_SIZE_IDX;
2fa9: c7 40 24 ff ff 00 00 movl $0xffff,0x24(%rax)
pool->arenaindex = (uint)(usable_arenas - arenas);
2fb0: 89 50 20 mov %edx,0x20(%rax)
usable_arenas->pool_address += POOL_SIZE;
2fb3: 48 8d 90 00 10 00 00 lea 0x1000(%rax),%rdx
2fba: 48 89 57 08 mov %rdx,0x8(%rdi)
--usable_arenas->nfreepools;
2fbe: 44 89 47 10 mov %r8d,0x10(%rdi)
if (usable_arenas->nfreepools == 0) {
2fc2: 45 85 c0 test %r8d,%r8d
2fc5: 0f 85 a5 fc ff ff jne 2c70 <_PyObject_Realloc+0x510>
2fcb: e9 6c fe ff ff jmpq 2e3c <_PyObject_Realloc+0x6dc>
usable_arenas = ao->nextarena;
2fd0: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 2fd7 <_PyObject_Realloc+0x877>
2fd7: e9 5b fb ff ff jmpq 2b37 <_PyObject_Realloc+0x3d7>
usable_arenas = ao->nextarena;
2fdc: 48 89 0d 00 00 00 00 mov %rcx,0x0(%rip) # 2fe3 <_PyObject_Realloc+0x883>
if (ao->nextarena != NULL) {
2fe3: e9 9c fe ff ff jmpq 2e84 <_PyObject_Realloc+0x724>
2fe8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
2fef: 00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment