]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/falloc.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
11 * falloc.h - FEE malloc routines
27 * Clients can *optionally* register external memory alloc/free functions here.
29 typedef void *(mallocExternFcn
)(unsigned size
);
30 typedef void (freeExternFcn
)(void *data
);
31 typedef void *(reallocExternFcn
)(void *oldData
, unsigned newSize
);
32 void fallocRegister(mallocExternFcn
*mallocExtern
,
33 freeExternFcn
*freeExtern
,
34 reallocExternFcn
*reallocExtern
);
37 void *fmalloc(unsigned size
); /* general malloc */
38 void *fmallocWithData(const void *origData
,
39 unsigned origDataLen
); /* malloc, copy existing data */
40 void ffree(void *data
); /* general free */
41 void *frealloc(void *oldPtr
, unsigned newSize
);
47 #endif /*_CK_FALLOC_H_*/