Lines Matching defs:pHdr

15634   struct MemBlockHdr *pHdr;
15638 pHdr = sqlite3MemsysGetHeader(p);
15639 return pHdr->iSize;
15700 struct MemBlockHdr *pHdr;
15710 totalSize = nReserve + sizeof(*pHdr) + sizeof(int) +
15716 pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];
15717 pHdr->pNext = 0;
15718 pHdr->pPrev = mem.pLast;
15720 mem.pLast->pNext = pHdr;
15722 mem.pFirst = pHdr;
15724 mem.pLast = pHdr;
15725 pHdr->iForeGuard = FOREGUARD;
15726 pHdr->eType = MEMTYPE_HEAP;
15727 pHdr->nBacktraceSlots = mem.nBacktrace;
15728 pHdr->nTitle = mem.nTitle;
15731 pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;
15732 memcpy(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));
15735 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
15738 pHdr->nBacktrace = 0;
15743 pHdr->iSize = nByte;
15745 pInt = (int*)&pHdr[1];
15759 struct MemBlockHdr *pHdr;
15764 pHdr = sqlite3MemsysGetHeader(pPrior);
15765 pBt = (void**)pHdr;
15766 pBt -= pHdr->nBacktraceSlots;
15768 if( pHdr->pPrev ){
15769 assert( pHdr->pPrev->pNext==pHdr );
15770 pHdr->pPrev->pNext = pHdr->pNext;
15772 assert( mem.pFirst==pHdr );
15773 mem.pFirst = pHdr->pNext;
15775 if( pHdr->pNext ){
15776 assert( pHdr->pNext->pPrev==pHdr );
15777 pHdr->pNext->pPrev = pHdr->pPrev;
15779 assert( mem.pLast==pHdr );
15780 mem.pLast = pHdr->pPrev;
15783 z -= pHdr->nTitle;
15784 adjustStats(pHdr->iSize, -1);
15785 randomFill(z, sizeof(void*)*pHdr->nBacktraceSlots + sizeof(*pHdr) +
15786 pHdr->iSize + sizeof(int) + pHdr->nTitle);
15840 struct MemBlockHdr *pHdr;
15841 pHdr = sqlite3MemsysGetHeader(p);
15842 assert( pHdr->iForeGuard==FOREGUARD );
15843 pHdr->eType = eType;
15859 struct MemBlockHdr *pHdr;
15860 pHdr = sqlite3MemsysGetHeader(p);
15861 assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */
15862 if( (pHdr->eType&eType)==0 ){
15881 struct MemBlockHdr *pHdr;
15882 pHdr = sqlite3MemsysGetHeader(p);
15883 assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */
15884 if( (pHdr->eType&eType)!=0 ){
15921 struct MemBlockHdr *pHdr;
15922 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
15923 void **pBt = (void**)pHdr;
15924 pBt -= pHdr->nBacktraceSlots;
15925 mem.xBacktrace(pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
15935 struct MemBlockHdr *pHdr;
15944 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
15945 char *z = (char*)pHdr;
15946 z -= pHdr->nBacktraceSlots*sizeof(void*) + pHdr->nTitle;
15948 pHdr->iSize, &pHdr[1], pHdr->nTitle ? z : "???");
15949 if( pHdr->nBacktrace ){
15951 pBt = (void**)pHdr;
15952 pBt -= pHdr->nBacktraceSlots;
15953 backtrace_symbols_fd(pBt, pHdr->nBacktrace, fileno(out));