\hypertarget{alloc_8h}{ \section{/home/pvrabec/openscap/openscap-\/0.5.7/src/common/public/alloc.h File Reference} \label{alloc_8h}\index{/home/pvrabec/openscap/openscap-\/0.5.7/src/common/public/alloc.h@{/home/pvrabec/openscap/openscap-\/0.5.7/src/common/public/alloc.h}} } OpenScap allocation helpers. {\ttfamily \#include $<$stdlib.h$>$}\par {\ttfamily \#include $<$assert.h$>$}\par \subsection*{Memory allocation} \label{_amgrp99f35e40910243d1dbc72b9353378b58} \begin{DoxyCompactItemize} \item \hypertarget{group__Internal_gaa154bb988a42b081159233920fba1c2a}{ \#define {\bfseries \_\-\_\-P}~\hyperlink{struct____attribute____}{\_\-\_\-attribute\_\-\_\-} ((unused)) static} \label{group__Internal_gaa154bb988a42b081159233920fba1c2a} \item \hypertarget{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd}{ \#define \hyperlink{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd}{oscap\_\-alloc}(s)~\_\-\_\-oscap\_\-alloc\_\-dbg (s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd} \begin{DoxyCompactList}\small\item\em malloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga358852384c6d7818ca12f1beedaa37e9}{ \#define \hyperlink{group__Internal_ga358852384c6d7818ca12f1beedaa37e9}{oscap\_\-calloc}(n, s)~\_\-\_\-oscap\_\-calloc\_\-dbg (n, s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga358852384c6d7818ca12f1beedaa37e9} \begin{DoxyCompactList}\small\item\em calloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe}{ \#define \hyperlink{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe}{oscap\_\-realloc}(p, s)~\_\-\_\-oscap\_\-realloc\_\-dbg ((void $\ast$)(p), s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe} \begin{DoxyCompactList}\small\item\em realloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e}{ \#define \hyperlink{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e}{oscap\_\-reallocf}(p, s)~\_\-\_\-oscap\_\-reallocf\_\-dbg ((void $\ast$)(p), s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e} \begin{DoxyCompactList}\small\item\em realloc wrapper freeing old memory on failure \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gafe2b938359b7ce5b887e284575aeaa28}{ \#define \hyperlink{group__Internal_gafe2b938359b7ce5b887e284575aeaa28}{oscap\_\-free}(p)~\_\-\_\-oscap\_\-free\_\-dbg ((void $\ast$$\ast$)((void $\ast$)\&(p)), \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_gafe2b938359b7ce5b887e284575aeaa28} \begin{DoxyCompactList}\small\item\em free wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga452a952a42c83c9d4aeb274bc86e3e52}{ \#define {\bfseries oscap\_\-talloc}(T)~((T $\ast$) oscap\_\-alloc(sizeof(T)))} \label{group__Internal_ga452a952a42c83c9d4aeb274bc86e3e52} \item \hypertarget{group__Internal_ga5af75a1401767cc54ada7b27338c156e}{ \#define {\bfseries oscap\_\-valloc}(v)~((typeof(v) $\ast$) oscap\_\-alloc(sizeof v))} \label{group__Internal_ga5af75a1401767cc54ada7b27338c156e} \item \hypertarget{group__Internal_ga3a077e4dad29aa6fe34ded73ca109c28}{ \#define {\bfseries \_\-A}(x)~assert(x)} \label{group__Internal_ga3a077e4dad29aa6fe34ded73ca109c28} \item \hypertarget{group__Internal_gad1cae716de897150e4464419697269e5}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-alloc\_\-dbg} (size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_gad1cae716de897150e4464419697269e5} \item \hypertarget{group__Internal_ga4c2ef16f2add273357368a55f27b5b85}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-alloc} (size\_\-t s)} \label{group__Internal_ga4c2ef16f2add273357368a55f27b5b85} \item \hypertarget{group__Internal_ga0a1b412613c0f83fd46bade7e2c19a93}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-calloc\_\-dbg} (size\_\-t n, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga0a1b412613c0f83fd46bade7e2c19a93} \item \hypertarget{group__Internal_ga55aa95b57eaf892689a47c1d41a3385c}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-calloc} (size\_\-t n, size\_\-t s)} \label{group__Internal_ga55aa95b57eaf892689a47c1d41a3385c} \item \hypertarget{group__Internal_ga1ef796ae53df1a6e65a5cc0c465fd99d}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-realloc\_\-dbg} (void $\ast$p, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga1ef796ae53df1a6e65a5cc0c465fd99d} \item \hypertarget{group__Internal_gad8c532eadbcb1873b00e81c562b6a693}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-realloc} (void $\ast$p, size\_\-t s)} \label{group__Internal_gad8c532eadbcb1873b00e81c562b6a693} \item \hypertarget{group__Internal_ga3f82fbff7c79faa9c60802024df0384e}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-reallocf\_\-dbg} (void $\ast$p, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga3f82fbff7c79faa9c60802024df0384e} \item \hypertarget{group__Internal_gaa9c73db7966c5c443c780c238e51e0c9}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-reallocf} (void $\ast$p, size\_\-t s)} \label{group__Internal_gaa9c73db7966c5c443c780c238e51e0c9} \item \hypertarget{group__Internal_ga97cb1983adcf08a9d319955e251076a4}{ void {\bfseries \_\-\_\-oscap\_\-free\_\-dbg} (void $\ast$$\ast$p, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga97cb1983adcf08a9d319955e251076a4} \item \hypertarget{group__Internal_gade6835b7bb32cef91a22f8de8b8c22b4}{ \_\-\_\-P void {\bfseries oscap\_\-free} (void $\ast$p)} \label{group__Internal_gade6835b7bb32cef91a22f8de8b8c22b4} \end{DoxyCompactItemize} \subsection{Detailed Description} OpenScap allocation helpers.