Security Scol plugin
allocate.h
Go to the documentation of this file.
1// allocate.h - written and placed in the public domain by Jeffrey Walton
2
3// The functions in allocate.h and allocate.cpp were originally in misc.h
4// and misc.cpp. They were extracted in September 2019 to sidestep a circular
5// dependency with misc.h and secblock.h.
6
9
10#ifndef CRYPTOPP_ALLOCATE_H
11#define CRYPTOPP_ALLOCATE_H
12
13#include "config.h"
14#include "cryptlib.h"
15
16NAMESPACE_BEGIN(CryptoPP)
17
18
30CRYPTOPP_DLL void CRYPTOPP_API CallNewHandler();
31
48CRYPTOPP_DLL void* CRYPTOPP_API AlignedAllocate(size_t size);
49
56CRYPTOPP_DLL void CRYPTOPP_API AlignedDeallocate(void *ptr);
57
63CRYPTOPP_DLL void * CRYPTOPP_API UnalignedAllocate(size_t size);
64
70CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *ptr);
71
72NAMESPACE_END
73
74#endif // CRYPTOPP_ALLOCATE_H
CRYPTOPP_DLL void CRYPTOPP_API AlignedDeallocate(void *ptr)
Frees a buffer allocated with AlignedAllocate.
Definition allocate.cpp:72
CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *ptr)
Frees a buffer allocated with UnalignedAllocate.
Definition allocate.cpp:100
CRYPTOPP_DLL void CRYPTOPP_API CallNewHandler()
Attempts to reclaim unused memory.
Definition allocate.cpp:28
CRYPTOPP_DLL void *CRYPTOPP_API AlignedAllocate(size_t size)
Allocates a buffer on 16-byte boundary.
Definition allocate.cpp:43
CRYPTOPP_DLL void *CRYPTOPP_API UnalignedAllocate(size_t size)
Allocates a buffer.
Definition allocate.cpp:92
Library configuration file.
Abstract base classes that provide a uniform interface to this library.