aboutsummaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-18 13:19:46 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-18 13:19:46 +0000
commita5c29b77f877aa33d63439e104952dd57286ccb3 (patch)
treefc4e4a73fefd0c7163a6e84734f6e79938687042 /text.py
parentupdate (diff)
downloadfaultreiber-a5c29b77f877aa33d63439e104952dd57286ccb3.tar.gz
faultreiber-a5c29b77f877aa33d63439e104952dd57286ccb3.zip
added a new option --calloc. lets you choose whether to use caloc or malloc
Diffstat (limited to 'text.py')
-rw-r--r--text.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/text.py b/text.py
index 71af4cc..bfc2d54 100644
--- a/text.py
+++ b/text.py
@@ -85,7 +85,7 @@ int32_t read_until_delimiter(int _fd, uint8_t delimiter) {
c_void_manager = """
void void_manager(void* ptr, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count) {
if (*current_void_size == 0) {
- *void_train = malloc(100*sizeof(void*));
+ *void_train = CCC(100*sizeof(void*));
*current_void_size = 100;
}
if (*current_void_count == *current_void_size) {
@@ -128,3 +128,5 @@ void void_manager(void* ptr, void*** void_train, uint64_t* current_void_size, ui
c_define_void_buff_size = "#define VOID_BUFF_SIZE XXX"
c_define_void_buff_grow_fact = "#define VOID_BUFFER_GROW_FACTOR XXX"
c_reserve_void_ptr = "malloc(XXX)"
+
+ ft_calloc_def="#define ft_calloc(X1) calloc(X1, 1)\n"