# rpmio/rpmmalloc.c File Reference

`#include "system.h"`
`#include "debug.h"`

Go to the source code of this file.

## Functions

void * | vmefail (size_t size)
void * | xmalloc (size_t size)
void * | xcalloc (size_t nmemb, size_t size)
void * | xrealloc (void *ptr, size_t size)
char * | xstrdup (const char *str)

## Detailed Description

Definition in file rpmmalloc.c.

## Function Documentation

void* vmefail | ( | size_t | size | ) |

| Definition at line 13 of file rpmmalloc.c. References _, and EXIT_FAILURE. Referenced by xcalloc(), xmalloc(), xrealloc(), and xstrdup().

void* xcalloc | ( | size_t | nmemb,
|  | size_t | size
| ) |

Definition at line 34 of file rpmmalloc.c.

References vmefail().

Referenced by addIndexEntry(), addTriggerIndex(), alCreate(), allocateExtensionCache(), alMakeIndex(), checkResponse(), dbiIndexNewItem(), dbiTagsInit(), defaultMachine(), dnlInitIterator(), fsmMkdirs(), fssizesTag(), ftpNLST(), genCpioListAndHeader(), generateDepends(), getFilesystemList(), headerGetLangs(), htCreate(), IDTXnew(), ignoreDep(), loadFi(), main(), mapInitIterator(), newFSM(), newPackage(), newRpmdb(), newSpec(), newStringBuf(), parseFormat(), parseSpec(), pgpNewDig(), processSourceFiles(), psmStage(), rpmdbAppendIterator(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbInitIterator(), rpmdbSetIteratorRE(), rpmdepCheck(), rpmDigestDup(), rpmDigestInit(), rpmGetFilesystemUsage(), rpmGetRpmlibProvides(), rpmInstallSourcePackage(), rpmReadPackageManifest(), rpmRunTransactions(), rpmtransCreateSet(), rpmVerifyScript(), saveHardLink(), tsInitIterator(), and XfdNew().

void* xmalloc | ( | size_t | size | ) |

Definition at line 24 of file rpmmalloc.c.

References vmefail().

Referenced by addRelation(), addSource(), armorFormat(), base64Format(), buildArgCallback(), checkPackageDeps(), convertAMD(), copyEntry(), cpioHeaderRead(), currentDirectory(), db1cget(), dbiSearch(), depflagsFormat(), do_inject(), doAddSubtract(), doBuildFileList(), doLookup(), doputenv(), doReadRC(), dosetenv(), expandMacroTable(), fflagsFormat(), formatValue(), fpCacheCreate(), fsmFsPath(), genChangelog(), genCpioListAndHeader(), grabData(), handleInstInstalledFiles(), hexFormat(), htAddEntry(), htCreate(), loadFi(), machAddEquiv(), main(), makeGPGSignature(), makePGPSignature(), newOpenFileInfo(), newSl(), newSt(), newStringBuf(), octalFormat(), permsFormat(), pgpHexSet(), pgpPrtSig(), pgpPrtUserID(), printDepend(), psAppend(), psCreate(), psmStage(), pushMacro(), queryArgCallback(), readIcon(), readLine(), realDateFormat(), rpmdbInitIterator(), rpmdbRebuild(), rpmDigestFinal(), rpmGlob(), rpmioSlurp(), rpmProblemString(), rpmSetVarArch(), rpmtransGetKeys(), shescapeFormat(), showQueryPackage(), singleSprintf(), splitString(), triggercondsTag(), triggertypeTag(), valueMakeInteger(), valueMakeString(), vrpmlog(), and XurlNew().

void* xrealloc | ( | void * | ptr,
|  | size_t | size
| ) |

Todo:
  Annotate ptr with returned/out.

Definition at line 45 of file rpmmalloc.c.

References vmefail().

Referenced by addCanon(), addDefault(), alAddPackage(), alAllFileSatisfiesDepend(), alAllSatisfiesDepend(), appendStringBufAux(), buildArgCallback(), checkPackageDeps(), currentDirectory(), dbiAppendSet(), expandMacroTable(), ftpNLST(), getFilesystemList(), gidToGname(), gnameToGid(), handleOverlappedFiles(), htAddEntry(), IDTXgrow(), installArgCallback(), machAddEquiv(), machCompatCacheAdd(), main(), psAppend(), queryArgCallback(), readLine(), removePackage(), rpmdbGrowIterator(), rpmdbSetIteratorRE(), rpmGlob(), rpmInstall(), rpmioSlurp(), rpmtransAddPackage(), showQueryPackage(), singleSprintf(), stashSt(), triggercondsTag(), uidToUname(), unameToUid(), and vrpmlog().

char* xstrdup | ( | const char * | str | ) |

Definition at line 55 of file rpmmalloc.c.

References vmefail().

Referenced by addCanon(), addDefault(), addSource(), addTriggerIndex(), alAllFileSatisfiesDepend(), armorFormat(), base64Format(), buildArgCallback(), checkPackageDeps(), convertAMD(), cpio_doio(), db1basename(), dbiTagsInit(), depflagsFormat(), doLookup(), doSetupMacro(), dupAttrRec(), fflagsFormat(), findProgramPath(), forceIncludeFile(), formatValue(), fsmMakeLinks(), genSourceRpmName(), getFilesystemList(), hexFormat(), i18nTag(), IDTXglob(), ignoreDep(), instprefixTag(), loadFi(), machAddEquiv(), machCompatCacheAdd(), main(), mireDup(), octalFormat(), parseExpression(), parseExpressionBoolean(), parseExpressionString(), parseForSimple(), parseScript(), parseSpec(), permsFormat(), poptAddItem(), poptGetNextOpt(), poptSetExecPath(), poptSetOtherOptionHelp(), processPackageFiles(), processSourceFiles(), pushMacro(), rdToken(), readLine(), realDateFormat(), rpmExpand(), rpmGetPath(), rpmGlob(), rpmInitMacros(), rpmInstallSourcePackage(), rpmPermsString(), rpmRangesOverlap(), rpmReadRC(), rpmRebuildTargetVars(), rpmSetMachine(), rpmSetVar(), rpmSetVarArch(), rpmtransCreateSet(), stashSt(), triggercondsTag(), triggertypeFormat(), triggertypeTag(), urlSplit(), writeLinkedFile(), and writeRPM().