mem3 67 base/memory/ref_counted_memory_unittest.cc scoped_refptr<RefCountedMemory> mem3 = RefCountedString::TakeString(&s3); mem3 69 base/memory/ref_counted_memory_unittest.cc EXPECT_FALSE(mem1->Equals(mem3)); mem3 70 base/memory/ref_counted_memory_unittest.cc EXPECT_FALSE(mem2->Equals(mem3)); mem3 899 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(kPaddedString3Size); mem3 911 gpu/command_buffer/client/gles2_implementation_unittest.cc kString3Size, mem3.id, mem3.offset); mem3 1149 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(kSize2); mem3 1168 gpu/command_buffer/client/gles2_implementation_unittest.cc GL_ARRAY_BUFFER, kEmuOffset2, kSize2, mem3.id, mem3.offset); mem3 1233 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(kSize2); mem3 1252 gpu/command_buffer/client/gles2_implementation_unittest.cc GL_ARRAY_BUFFER, kEmuOffset2, kSize2, mem3.id, mem3.offset); mem3 1344 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(kSize2); mem3 1361 gpu/command_buffer/client/gles2_implementation_unittest.cc GL_ARRAY_BUFFER, kEmuOffset2, kSize2, mem3.id, mem3.offset); mem3 1434 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(kSize2); mem3 1454 gpu/command_buffer/client/gles2_implementation_unittest.cc GL_ARRAY_BUFFER, kEmuOffset2, kSize2, mem3.id, mem3.offset); mem3 2410 gpu/command_buffer/client/gles2_implementation_unittest.cc ExpectedMemoryInfo mem3 = GetExpectedMemory(half_size); mem3 2417 gpu/command_buffer/client/gles2_implementation_unittest.cc mem3.id, mem3.offset, true); mem3 202 gpu/command_buffer/client/mapped_memory_unittest.cc void* mem3 = manager_->Alloc(kSize, &id3, &offset3); mem3 203 gpu/command_buffer/client/mapped_memory_unittest.cc ASSERT_TRUE(mem3 != NULL); mem3 204 gpu/command_buffer/client/mapped_memory_unittest.cc EXPECT_NE(mem2, mem3); mem3 208 gpu/command_buffer/client/mapped_memory_unittest.cc manager_->Free(mem3); mem3 314 gpu/command_buffer/client/mapped_memory_unittest.cc void* mem3 = manager_->Alloc(kSize, &id3, &offset3); mem3 317 gpu/command_buffer/client/mapped_memory_unittest.cc ASSERT_TRUE(mem3); mem3 395 gpu/command_buffer/client/mapped_memory_unittest.cc void* mem3 = manager_->Alloc(kSize, &id3, &offset3); mem3 396 gpu/command_buffer/client/mapped_memory_unittest.cc ASSERT_TRUE(mem3); mem3 448 gpu/command_buffer/client/mapped_memory_unittest.cc void* mem3 = manager_->Alloc(kSize, &id3, &offset3); mem3 452 gpu/command_buffer/client/mapped_memory_unittest.cc manager_->Free(mem3); mem3 56 ppapi/generators/test_cgen/interface.h int32_t (*mem3)(struct ist* b); mem3 15247 third_party/sqlite/amalgamation/sqlite3.c } mem3 = { 97535575 }; mem3 15249 third_party/sqlite/amalgamation/sqlite3.c #define mem3 GLOBAL(struct Mem3Global, mem3) mem3 15256 third_party/sqlite/amalgamation/sqlite3.c u32 next = mem3.aPool[i].u.list.next; mem3 15257 third_party/sqlite/amalgamation/sqlite3.c u32 prev = mem3.aPool[i].u.list.prev; mem3 15258 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15262 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[prev].u.list.next = next; mem3 15265 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[next].u.list.prev = prev; mem3 15267 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i].u.list.next = 0; mem3 15268 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i].u.list.prev = 0; mem3 15277 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15278 third_party/sqlite/amalgamation/sqlite3.c assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 ); mem3 15280 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 15281 third_party/sqlite/amalgamation/sqlite3.c assert( size==mem3.aPool[i+size-1].u.hdr.prevSize ); mem3 15284 third_party/sqlite/amalgamation/sqlite3.c memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]); mem3 15287 third_party/sqlite/amalgamation/sqlite3.c memsys3UnlinkFromList(i, &mem3.aiHash[hash]); mem3 15296 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15297 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i].u.list.next = *pRoot; mem3 15298 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i].u.list.prev = 0; mem3 15300 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[*pRoot].u.list.prev = i; mem3 15311 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15313 third_party/sqlite/amalgamation/sqlite3.c assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 ); mem3 15314 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 15315 third_party/sqlite/amalgamation/sqlite3.c assert( size==mem3.aPool[i+size-1].u.hdr.prevSize ); mem3 15318 third_party/sqlite/amalgamation/sqlite3.c memsys3LinkIntoList(i, &mem3.aiSmall[size-2]); mem3 15321 third_party/sqlite/amalgamation/sqlite3.c memsys3LinkIntoList(i, &mem3.aiHash[hash]); mem3 15331 third_party/sqlite/amalgamation/sqlite3.c if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){ mem3 15332 third_party/sqlite/amalgamation/sqlite3.c mem3.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); mem3 15334 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(mem3.mutex); mem3 15337 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(mem3.mutex); mem3 15344 third_party/sqlite/amalgamation/sqlite3.c if( !mem3.alarmBusy ){ mem3 15345 third_party/sqlite/amalgamation/sqlite3.c mem3.alarmBusy = 1; mem3 15346 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15347 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(mem3.mutex); mem3 15349 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(mem3.mutex); mem3 15350 third_party/sqlite/amalgamation/sqlite3.c mem3.alarmBusy = 0; mem3 15362 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15364 third_party/sqlite/amalgamation/sqlite3.c assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ); mem3 15365 third_party/sqlite/amalgamation/sqlite3.c assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock ); mem3 15366 third_party/sqlite/amalgamation/sqlite3.c x = mem3.aPool[i-1].u.hdr.size4x; mem3 15367 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2); mem3 15368 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock; mem3 15369 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2; mem3 15370 third_party/sqlite/amalgamation/sqlite3.c return &mem3.aPool[i]; mem3 15379 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15380 third_party/sqlite/amalgamation/sqlite3.c assert( mem3.szMaster>=nBlock ); mem3 15381 third_party/sqlite/amalgamation/sqlite3.c if( nBlock>=mem3.szMaster-1 ){ mem3 15383 third_party/sqlite/amalgamation/sqlite3.c void *p = memsys3Checkout(mem3.iMaster, mem3.szMaster); mem3 15384 third_party/sqlite/amalgamation/sqlite3.c mem3.iMaster = 0; mem3 15385 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster = 0; mem3 15386 third_party/sqlite/amalgamation/sqlite3.c mem3.mnMaster = 0; mem3 15391 third_party/sqlite/amalgamation/sqlite3.c newi = mem3.iMaster + mem3.szMaster - nBlock; mem3 15392 third_party/sqlite/amalgamation/sqlite3.c assert( newi > mem3.iMaster+1 ); mem3 15393 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock; mem3 15394 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x |= 2; mem3 15395 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1; mem3 15396 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster -= nBlock; mem3 15397 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[newi-1].u.hdr.prevSize = mem3.szMaster; mem3 15398 third_party/sqlite/amalgamation/sqlite3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 15399 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 15400 third_party/sqlite/amalgamation/sqlite3.c if( mem3.szMaster < mem3.mnMaster ){ mem3 15401 third_party/sqlite/amalgamation/sqlite3.c mem3.mnMaster = mem3.szMaster; mem3 15403 third_party/sqlite/amalgamation/sqlite3.c return (void*)&mem3.aPool[newi]; mem3 15426 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15428 third_party/sqlite/amalgamation/sqlite3.c iNext = mem3.aPool[i].u.list.next; mem3 15429 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[i-1].u.hdr.size4x; mem3 15433 third_party/sqlite/amalgamation/sqlite3.c assert( i > mem3.aPool[i-1].u.hdr.prevSize ); mem3 15434 third_party/sqlite/amalgamation/sqlite3.c prev = i - mem3.aPool[i-1].u.hdr.prevSize; mem3 15436 third_party/sqlite/amalgamation/sqlite3.c iNext = mem3.aPool[prev].u.list.next; mem3 15440 third_party/sqlite/amalgamation/sqlite3.c x = mem3.aPool[prev-1].u.hdr.size4x & 2; mem3 15441 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[prev-1].u.hdr.size4x = size*4 | x; mem3 15442 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[prev+size-1].u.hdr.prevSize = size; mem3 15448 third_party/sqlite/amalgamation/sqlite3.c if( size>mem3.szMaster ){ mem3 15449 third_party/sqlite/amalgamation/sqlite3.c mem3.iMaster = i; mem3 15450 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster = size; mem3 15467 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15482 third_party/sqlite/amalgamation/sqlite3.c i = mem3.aiSmall[nBlock-2]; mem3 15484 third_party/sqlite/amalgamation/sqlite3.c memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]); mem3 15489 third_party/sqlite/amalgamation/sqlite3.c for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){ mem3 15490 third_party/sqlite/amalgamation/sqlite3.c if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){ mem3 15491 third_party/sqlite/amalgamation/sqlite3.c memsys3UnlinkFromList(i, &mem3.aiHash[hash]); mem3 15501 third_party/sqlite/amalgamation/sqlite3.c if( mem3.szMaster>=nBlock ){ mem3 15513 third_party/sqlite/amalgamation/sqlite3.c for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){ mem3 15515 third_party/sqlite/amalgamation/sqlite3.c if( mem3.iMaster ){ mem3 15516 third_party/sqlite/amalgamation/sqlite3.c memsys3Link(mem3.iMaster); mem3 15517 third_party/sqlite/amalgamation/sqlite3.c mem3.iMaster = 0; mem3 15518 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster = 0; mem3 15521 third_party/sqlite/amalgamation/sqlite3.c memsys3Merge(&mem3.aiHash[i]); mem3 15524 third_party/sqlite/amalgamation/sqlite3.c memsys3Merge(&mem3.aiSmall[i]); mem3 15526 third_party/sqlite/amalgamation/sqlite3.c if( mem3.szMaster ){ mem3 15527 third_party/sqlite/amalgamation/sqlite3.c memsys3Unlink(mem3.iMaster); mem3 15528 third_party/sqlite/amalgamation/sqlite3.c if( mem3.szMaster>=nBlock ){ mem3 15548 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 15549 third_party/sqlite/amalgamation/sqlite3.c assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] ); mem3 15550 third_party/sqlite/amalgamation/sqlite3.c i = p - mem3.aPool; mem3 15551 third_party/sqlite/amalgamation/sqlite3.c assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 ); mem3 15552 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 15553 third_party/sqlite/amalgamation/sqlite3.c assert( i+size<=mem3.nPool+1 ); mem3 15554 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i-1].u.hdr.size4x &= ~1; mem3 15555 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i+size-1].u.hdr.prevSize = size; mem3 15556 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[i+size-1].u.hdr.size4x &= ~2; mem3 15560 third_party/sqlite/amalgamation/sqlite3.c if( mem3.iMaster ){ mem3 15561 third_party/sqlite/amalgamation/sqlite3.c while( (mem3.aPool[mem3.iMaster-1].u.hdr.size4x&2)==0 ){ mem3 15562 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[mem3.iMaster-1].u.hdr.prevSize; mem3 15563 third_party/sqlite/amalgamation/sqlite3.c mem3.iMaster -= size; mem3 15564 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster += size; mem3 15565 third_party/sqlite/amalgamation/sqlite3.c memsys3Unlink(mem3.iMaster); mem3 15566 third_party/sqlite/amalgamation/sqlite3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 15567 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 15568 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster; mem3 15570 third_party/sqlite/amalgamation/sqlite3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 15571 third_party/sqlite/amalgamation/sqlite3.c while( (mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x&1)==0 ){ mem3 15572 third_party/sqlite/amalgamation/sqlite3.c memsys3Unlink(mem3.iMaster+mem3.szMaster); mem3 15573 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster += mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x/4; mem3 15574 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 15575 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster; mem3 15668 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap; mem3 15669 third_party/sqlite/amalgamation/sqlite3.c mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2; mem3 15672 third_party/sqlite/amalgamation/sqlite3.c mem3.szMaster = mem3.nPool; mem3 15673 third_party/sqlite/amalgamation/sqlite3.c mem3.mnMaster = mem3.szMaster; mem3 15674 third_party/sqlite/amalgamation/sqlite3.c mem3.iMaster = 1; mem3 15675 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[0].u.hdr.size4x = (mem3.szMaster<<2) + 2; mem3 15676 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool; mem3 15677 third_party/sqlite/amalgamation/sqlite3.c mem3.aPool[mem3.nPool].u.hdr.size4x = 1; mem3 15687 third_party/sqlite/amalgamation/sqlite3.c mem3.mutex = 0; mem3 15714 third_party/sqlite/amalgamation/sqlite3.c for(i=1; i<=mem3.nPool; i+=size/4){ mem3 15715 third_party/sqlite/amalgamation/sqlite3.c size = mem3.aPool[i-1].u.hdr.size4x; mem3 15717 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "%p size error\n", &mem3.aPool[i]); mem3 15721 third_party/sqlite/amalgamation/sqlite3.c if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){ mem3 15722 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]); mem3 15726 third_party/sqlite/amalgamation/sqlite3.c if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){ mem3 15727 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "%p tail checkout bit is incorrect\n", &mem3.aPool[i]); mem3 15732 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8); mem3 15734 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8, mem3 15735 third_party/sqlite/amalgamation/sqlite3.c i==mem3.iMaster ? " **master**" : ""); mem3 15739 third_party/sqlite/amalgamation/sqlite3.c if( mem3.aiSmall[i]==0 ) continue; mem3 15741 third_party/sqlite/amalgamation/sqlite3.c for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){ mem3 15742 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, " %p(%d)", &mem3.aPool[j], mem3 15743 third_party/sqlite/amalgamation/sqlite3.c (mem3.aPool[j-1].u.hdr.size4x/4)*8-8); mem3 15748 third_party/sqlite/amalgamation/sqlite3.c if( mem3.aiHash[i]==0 ) continue; mem3 15750 third_party/sqlite/amalgamation/sqlite3.c for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){ mem3 15751 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, " %p(%d)", &mem3.aPool[j], mem3 15752 third_party/sqlite/amalgamation/sqlite3.c (mem3.aPool[j-1].u.hdr.size4x/4)*8-8); mem3 15756 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "master=%d\n", mem3.iMaster); mem3 15757 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "nowUsed=%d\n", mem3.nPool*8 - mem3.szMaster*8); mem3 15758 third_party/sqlite/amalgamation/sqlite3.c fprintf(out, "mxUsed=%d\n", mem3.nPool*8 - mem3.mnMaster*8); mem3 15759 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(mem3.mutex); mem3 139 third_party/sqlite/src/src/mem3.c } mem3 = { 97535575 }; mem3 141 third_party/sqlite/src/src/mem3.c #define mem3 GLOBAL(struct Mem3Global, mem3) mem3 148 third_party/sqlite/src/src/mem3.c u32 next = mem3.aPool[i].u.list.next; mem3 149 third_party/sqlite/src/src/mem3.c u32 prev = mem3.aPool[i].u.list.prev; mem3 150 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 154 third_party/sqlite/src/src/mem3.c mem3.aPool[prev].u.list.next = next; mem3 157 third_party/sqlite/src/src/mem3.c mem3.aPool[next].u.list.prev = prev; mem3 159 third_party/sqlite/src/src/mem3.c mem3.aPool[i].u.list.next = 0; mem3 160 third_party/sqlite/src/src/mem3.c mem3.aPool[i].u.list.prev = 0; mem3 169 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 170 third_party/sqlite/src/src/mem3.c assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 ); mem3 172 third_party/sqlite/src/src/mem3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 173 third_party/sqlite/src/src/mem3.c assert( size==mem3.aPool[i+size-1].u.hdr.prevSize ); mem3 176 third_party/sqlite/src/src/mem3.c memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]); mem3 179 third_party/sqlite/src/src/mem3.c memsys3UnlinkFromList(i, &mem3.aiHash[hash]); mem3 188 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 189 third_party/sqlite/src/src/mem3.c mem3.aPool[i].u.list.next = *pRoot; mem3 190 third_party/sqlite/src/src/mem3.c mem3.aPool[i].u.list.prev = 0; mem3 192 third_party/sqlite/src/src/mem3.c mem3.aPool[*pRoot].u.list.prev = i; mem3 203 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 205 third_party/sqlite/src/src/mem3.c assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 ); mem3 206 third_party/sqlite/src/src/mem3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 207 third_party/sqlite/src/src/mem3.c assert( size==mem3.aPool[i+size-1].u.hdr.prevSize ); mem3 210 third_party/sqlite/src/src/mem3.c memsys3LinkIntoList(i, &mem3.aiSmall[size-2]); mem3 213 third_party/sqlite/src/src/mem3.c memsys3LinkIntoList(i, &mem3.aiHash[hash]); mem3 223 third_party/sqlite/src/src/mem3.c if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){ mem3 224 third_party/sqlite/src/src/mem3.c mem3.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); mem3 226 third_party/sqlite/src/src/mem3.c sqlite3_mutex_enter(mem3.mutex); mem3 229 third_party/sqlite/src/src/mem3.c sqlite3_mutex_leave(mem3.mutex); mem3 236 third_party/sqlite/src/src/mem3.c if( !mem3.alarmBusy ){ mem3 237 third_party/sqlite/src/src/mem3.c mem3.alarmBusy = 1; mem3 238 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 239 third_party/sqlite/src/src/mem3.c sqlite3_mutex_leave(mem3.mutex); mem3 241 third_party/sqlite/src/src/mem3.c sqlite3_mutex_enter(mem3.mutex); mem3 242 third_party/sqlite/src/src/mem3.c mem3.alarmBusy = 0; mem3 254 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 256 third_party/sqlite/src/src/mem3.c assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ); mem3 257 third_party/sqlite/src/src/mem3.c assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock ); mem3 258 third_party/sqlite/src/src/mem3.c x = mem3.aPool[i-1].u.hdr.size4x; mem3 259 third_party/sqlite/src/src/mem3.c mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2); mem3 260 third_party/sqlite/src/src/mem3.c mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock; mem3 261 third_party/sqlite/src/src/mem3.c mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2; mem3 262 third_party/sqlite/src/src/mem3.c return &mem3.aPool[i]; mem3 271 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 272 third_party/sqlite/src/src/mem3.c assert( mem3.szMaster>=nBlock ); mem3 273 third_party/sqlite/src/src/mem3.c if( nBlock>=mem3.szMaster-1 ){ mem3 275 third_party/sqlite/src/src/mem3.c void *p = memsys3Checkout(mem3.iMaster, mem3.szMaster); mem3 276 third_party/sqlite/src/src/mem3.c mem3.iMaster = 0; mem3 277 third_party/sqlite/src/src/mem3.c mem3.szMaster = 0; mem3 278 third_party/sqlite/src/src/mem3.c mem3.mnMaster = 0; mem3 283 third_party/sqlite/src/src/mem3.c newi = mem3.iMaster + mem3.szMaster - nBlock; mem3 284 third_party/sqlite/src/src/mem3.c assert( newi > mem3.iMaster+1 ); mem3 285 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock; mem3 286 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x |= 2; mem3 287 third_party/sqlite/src/src/mem3.c mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1; mem3 288 third_party/sqlite/src/src/mem3.c mem3.szMaster -= nBlock; mem3 289 third_party/sqlite/src/src/mem3.c mem3.aPool[newi-1].u.hdr.prevSize = mem3.szMaster; mem3 290 third_party/sqlite/src/src/mem3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 291 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 292 third_party/sqlite/src/src/mem3.c if( mem3.szMaster < mem3.mnMaster ){ mem3 293 third_party/sqlite/src/src/mem3.c mem3.mnMaster = mem3.szMaster; mem3 295 third_party/sqlite/src/src/mem3.c return (void*)&mem3.aPool[newi]; mem3 318 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 320 third_party/sqlite/src/src/mem3.c iNext = mem3.aPool[i].u.list.next; mem3 321 third_party/sqlite/src/src/mem3.c size = mem3.aPool[i-1].u.hdr.size4x; mem3 325 third_party/sqlite/src/src/mem3.c assert( i > mem3.aPool[i-1].u.hdr.prevSize ); mem3 326 third_party/sqlite/src/src/mem3.c prev = i - mem3.aPool[i-1].u.hdr.prevSize; mem3 328 third_party/sqlite/src/src/mem3.c iNext = mem3.aPool[prev].u.list.next; mem3 332 third_party/sqlite/src/src/mem3.c x = mem3.aPool[prev-1].u.hdr.size4x & 2; mem3 333 third_party/sqlite/src/src/mem3.c mem3.aPool[prev-1].u.hdr.size4x = size*4 | x; mem3 334 third_party/sqlite/src/src/mem3.c mem3.aPool[prev+size-1].u.hdr.prevSize = size; mem3 340 third_party/sqlite/src/src/mem3.c if( size>mem3.szMaster ){ mem3 341 third_party/sqlite/src/src/mem3.c mem3.iMaster = i; mem3 342 third_party/sqlite/src/src/mem3.c mem3.szMaster = size; mem3 359 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 374 third_party/sqlite/src/src/mem3.c i = mem3.aiSmall[nBlock-2]; mem3 376 third_party/sqlite/src/src/mem3.c memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]); mem3 381 third_party/sqlite/src/src/mem3.c for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){ mem3 382 third_party/sqlite/src/src/mem3.c if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){ mem3 383 third_party/sqlite/src/src/mem3.c memsys3UnlinkFromList(i, &mem3.aiHash[hash]); mem3 393 third_party/sqlite/src/src/mem3.c if( mem3.szMaster>=nBlock ){ mem3 405 third_party/sqlite/src/src/mem3.c for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){ mem3 407 third_party/sqlite/src/src/mem3.c if( mem3.iMaster ){ mem3 408 third_party/sqlite/src/src/mem3.c memsys3Link(mem3.iMaster); mem3 409 third_party/sqlite/src/src/mem3.c mem3.iMaster = 0; mem3 410 third_party/sqlite/src/src/mem3.c mem3.szMaster = 0; mem3 413 third_party/sqlite/src/src/mem3.c memsys3Merge(&mem3.aiHash[i]); mem3 416 third_party/sqlite/src/src/mem3.c memsys3Merge(&mem3.aiSmall[i]); mem3 418 third_party/sqlite/src/src/mem3.c if( mem3.szMaster ){ mem3 419 third_party/sqlite/src/src/mem3.c memsys3Unlink(mem3.iMaster); mem3 420 third_party/sqlite/src/src/mem3.c if( mem3.szMaster>=nBlock ){ mem3 440 third_party/sqlite/src/src/mem3.c assert( sqlite3_mutex_held(mem3.mutex) ); mem3 441 third_party/sqlite/src/src/mem3.c assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] ); mem3 442 third_party/sqlite/src/src/mem3.c i = p - mem3.aPool; mem3 443 third_party/sqlite/src/src/mem3.c assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 ); mem3 444 third_party/sqlite/src/src/mem3.c size = mem3.aPool[i-1].u.hdr.size4x/4; mem3 445 third_party/sqlite/src/src/mem3.c assert( i+size<=mem3.nPool+1 ); mem3 446 third_party/sqlite/src/src/mem3.c mem3.aPool[i-1].u.hdr.size4x &= ~1; mem3 447 third_party/sqlite/src/src/mem3.c mem3.aPool[i+size-1].u.hdr.prevSize = size; mem3 448 third_party/sqlite/src/src/mem3.c mem3.aPool[i+size-1].u.hdr.size4x &= ~2; mem3 452 third_party/sqlite/src/src/mem3.c if( mem3.iMaster ){ mem3 453 third_party/sqlite/src/src/mem3.c while( (mem3.aPool[mem3.iMaster-1].u.hdr.size4x&2)==0 ){ mem3 454 third_party/sqlite/src/src/mem3.c size = mem3.aPool[mem3.iMaster-1].u.hdr.prevSize; mem3 455 third_party/sqlite/src/src/mem3.c mem3.iMaster -= size; mem3 456 third_party/sqlite/src/src/mem3.c mem3.szMaster += size; mem3 457 third_party/sqlite/src/src/mem3.c memsys3Unlink(mem3.iMaster); mem3 458 third_party/sqlite/src/src/mem3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 459 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 460 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster; mem3 462 third_party/sqlite/src/src/mem3.c x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2; mem3 463 third_party/sqlite/src/src/mem3.c while( (mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x&1)==0 ){ mem3 464 third_party/sqlite/src/src/mem3.c memsys3Unlink(mem3.iMaster+mem3.szMaster); mem3 465 third_party/sqlite/src/src/mem3.c mem3.szMaster += mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x/4; mem3 466 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x; mem3 467 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster; mem3 560 third_party/sqlite/src/src/mem3.c mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap; mem3 561 third_party/sqlite/src/src/mem3.c mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2; mem3 564 third_party/sqlite/src/src/mem3.c mem3.szMaster = mem3.nPool; mem3 565 third_party/sqlite/src/src/mem3.c mem3.mnMaster = mem3.szMaster; mem3 566 third_party/sqlite/src/src/mem3.c mem3.iMaster = 1; mem3 567 third_party/sqlite/src/src/mem3.c mem3.aPool[0].u.hdr.size4x = (mem3.szMaster<<2) + 2; mem3 568 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool; mem3 569 third_party/sqlite/src/src/mem3.c mem3.aPool[mem3.nPool].u.hdr.size4x = 1; mem3 579 third_party/sqlite/src/src/mem3.c mem3.mutex = 0; mem3 606 third_party/sqlite/src/src/mem3.c for(i=1; i<=mem3.nPool; i+=size/4){ mem3 607 third_party/sqlite/src/src/mem3.c size = mem3.aPool[i-1].u.hdr.size4x; mem3 609 third_party/sqlite/src/src/mem3.c fprintf(out, "%p size error\n", &mem3.aPool[i]); mem3 613 third_party/sqlite/src/src/mem3.c if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){ mem3 614 third_party/sqlite/src/src/mem3.c fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]); mem3 618 third_party/sqlite/src/src/mem3.c if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){ mem3 619 third_party/sqlite/src/src/mem3.c fprintf(out, "%p tail checkout bit is incorrect\n", &mem3.aPool[i]); mem3 624 third_party/sqlite/src/src/mem3.c fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8); mem3 626 third_party/sqlite/src/src/mem3.c fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8, mem3 627 third_party/sqlite/src/src/mem3.c i==mem3.iMaster ? " **master**" : ""); mem3 631 third_party/sqlite/src/src/mem3.c if( mem3.aiSmall[i]==0 ) continue; mem3 633 third_party/sqlite/src/src/mem3.c for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){ mem3 634 third_party/sqlite/src/src/mem3.c fprintf(out, " %p(%d)", &mem3.aPool[j], mem3 635 third_party/sqlite/src/src/mem3.c (mem3.aPool[j-1].u.hdr.size4x/4)*8-8); mem3 640 third_party/sqlite/src/src/mem3.c if( mem3.aiHash[i]==0 ) continue; mem3 642 third_party/sqlite/src/src/mem3.c for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){ mem3 643 third_party/sqlite/src/src/mem3.c fprintf(out, " %p(%d)", &mem3.aPool[j], mem3 644 third_party/sqlite/src/src/mem3.c (mem3.aPool[j-1].u.hdr.size4x/4)*8-8); mem3 648 third_party/sqlite/src/src/mem3.c fprintf(out, "master=%d\n", mem3.iMaster); mem3 649 third_party/sqlite/src/src/mem3.c fprintf(out, "nowUsed=%d\n", mem3.nPool*8 - mem3.szMaster*8); mem3 650 third_party/sqlite/src/src/mem3.c fprintf(out, "mxUsed=%d\n", mem3.nPool*8 - mem3.mnMaster*8); mem3 651 third_party/sqlite/src/src/mem3.c sqlite3_mutex_leave(mem3.mutex);