2016-09-05 19:47:26 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-05 19:47:26 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
2016-09-06 16:44:05 +00:00
|
|
|
#ifndef _MEMORY_H
|
|
|
|
#define _MEMORY_H
|
2016-09-05 19:47:26 +00:00
|
|
|
|
2016-10-09 20:41:55 +00:00
|
|
|
#include <stdio.h>
|
2016-09-05 19:47:26 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#define MSG_ENOMEM "Insufficient memory available"
|
|
|
|
|
2016-10-13 08:07:04 +00:00
|
|
|
#define VERIFY_PTR(v) if ((v) == NULL) return -1;
|
|
|
|
|
2016-10-10 09:03:11 +00:00
|
|
|
void *hccalloc (hashcat_ctx_t *hashcat_ctx, const size_t nmemb, const size_t sz);
|
|
|
|
void *hcmalloc (hashcat_ctx_t *hashcat_ctx, const size_t sz);
|
|
|
|
void *hcrealloc (hashcat_ctx_t *hashcat_ctx, void *ptr, const size_t oldsz, const size_t addsz);
|
|
|
|
char *hcstrdup (hashcat_ctx_t *hashcat_ctx, const char *s);
|
|
|
|
void hcfree (void *ptr);
|
2016-09-06 16:44:05 +00:00
|
|
|
|
|
|
|
#endif // _MEMORY_H
|