mirror of
https://github.com/hashcat/hashcat.git
synced 2025-08-05 05:15:20 +00:00

## OpenCL Backend - added hc_clCreateBuffer wrapper, hc_clCreateBuffer_pre - updated HC_OCL_CREATEBUFFER macro - updated other two hc_clEnqueueWriteBuffer from CL_FALSE to CL_TRUE ## Metal Backend - added hc_mtlFinish - updated hc_mtlCreateBuffer ## Memory - added hc_alloc_aligned and hc_free_aligned - renamed hcmalloc_aligned and hcfree_aligned to hcmalloc_bridge_aligned and hcfree_bridge_aligned ## Backend & Bridge - updated references of hcmalloc_aligned and hcfree_aligned to the new memory defined functions
28 lines
753 B
C
28 lines
753 B
C
/**
|
|
* Author......: See docs/credits.txt
|
|
* License.....: MIT
|
|
*/
|
|
|
|
#ifndef HC_MEMORY_H
|
|
#define HC_MEMORY_H
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
#define MSG_ENOMEM "Insufficient memory available"
|
|
|
|
void *hccalloc (const size_t nmemb, const size_t sz);
|
|
void *hcmalloc (const size_t sz);
|
|
void *hcrealloc (void *ptr, const size_t oldsz, const size_t addsz);
|
|
char *hcstrdup (const char *s);
|
|
void hcfree (void *ptr);
|
|
|
|
void *hc_alloc_aligned (size_t alignment, size_t size);
|
|
void hc_free_aligned (void **ptr);
|
|
|
|
void *hcmalloc_bridge_aligned (const size_t sz, const int align);
|
|
void hcfree_bridge_aligned (void *ptr);
|
|
|
|
#endif // HC_MEMORY_H
|