| 1 |
#ifndef STRING_PILE_H |
| 2 |
#define STRING_PILE_H |
| 3 |
|
| 4 |
#include "main.h" |
| 5 |
#include <stdbool.h> |
| 6 |
#include <stddef.h> |
| 7 |
|
| 8 |
/** |
| 9 |
* Initialize string pile with init_size to mmap. init_size will be aligned up |
| 10 |
* to 0x1000. |
| 11 |
* Returns if mmap succeeded. |
| 12 |
*/ |
| 13 |
extern bool init_pile (size_t init_size); |
| 14 |
|
| 15 |
/** |
| 16 |
* Slice some mmap memory to store syscall name. |
| 17 |
* sysname: syscall name string. NULL-terminated. |
| 18 |
* arch: a token from token_pairs. if not NULL, store "arch.sysname", else |
| 19 |
* "sysname". |
| 20 |
*/ |
| 21 |
extern string_t persist_object (const char *sysname, const string_t *arch); |
| 22 |
|
| 23 |
extern void free_pile (void); |
| 24 |
|
| 25 |
#endif |