You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
423 B
20 lines
423 B
#include "aquery.h"
|
|
|
|
#include <memory>
|
|
#include <stdlib>
|
|
#include <unordered_set>
|
|
|
|
Session* session;
|
|
void* Aalloc(size_t sz){
|
|
void mem = malloc(sz);
|
|
auto memmap = (std::unordered_set<void*>*) session->memory_map;
|
|
memmap->insert(mem);
|
|
return mem;
|
|
}
|
|
|
|
int Afree(void* mem){
|
|
auto memmap = (std::unordered_set<void*>*) session->memory_map;
|
|
memmap->erase(mem);
|
|
return free(mem);
|
|
}
|