X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fopenjp2%2Fopj_malloc.h;h=cbc4106c7c4338d573885bdec4e20aa170501b4e;hb=cab352e249ed3372dd9355c85e837613fff98fa2;hp=c8c2fc2dbb45403b17610e387973023bebaf027a;hpb=3c2972f924857016bb454201c7e92f25de9105ee;p=openjpeg.git diff --git a/src/lib/openjp2/opj_malloc.h b/src/lib/openjp2/opj_malloc.h index c8c2fc2d..cbc4106c 100644 --- a/src/lib/openjp2/opj_malloc.h +++ b/src/lib/openjp2/opj_malloc.h @@ -29,8 +29,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __OPJ_MALLOC_H -#define __OPJ_MALLOC_H +#ifndef OPJ_MALLOC_H +#define OPJ_MALLOC_H #include /** @@ -56,8 +56,8 @@ void * opj_malloc(size_t size); /** Allocate a memory block with elements initialized to 0 -@param num Blocks to allocate -@param size Bytes per block to allocate +@param numOfElements Blocks to allocate +@param sizeOfElements Bytes per block to allocate @return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available */ void * opj_calloc(size_t numOfElements, size_t sizeOfElements); @@ -71,6 +71,14 @@ void * opj_aligned_malloc(size_t size); void * opj_aligned_realloc(void *ptr, size_t size); void opj_aligned_free(void* ptr); +/** +Allocate memory aligned to a 32 byte boundary +@param size Bytes to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +void * opj_aligned_32_malloc(size_t size); +void * opj_aligned_32_realloc(void *ptr, size_t size); + /** Reallocate memory blocks. @param m Pointer to previously allocated memory block @@ -94,5 +102,5 @@ void opj_free(void * m); /*@}*/ -#endif /* __OPJ_MALLOC_H */ +#endif /* OPJ_MALLOC_H */