From adb2d8404294dd986aa8b14dcdf84ab7c239f5e3 Mon Sep 17 00:00:00 2001 From: Anisse Astier Date: Fri, 5 Sep 2014 18:00:08 +0200 Subject: [PATCH] Add debug messages --- src/bin/options_behavior.c | 1 - src/bin/termptysave.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c index 6a9204b2..88f88c2a 100644 --- a/src/bin/options_behavior.c +++ b/src/bin/options_behavior.c @@ -548,7 +548,6 @@ options_behavior(Evas_Object *opbox, Evas_Object *term) elm_slider_indicator_format_function_set(o, sback_indicator_units_format, (void(*)(char*))eina_stringshare_del); - elm_slider_min_max_set(o, 0, 10000); /* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogFloat */ union { float v; diff --git a/src/bin/termptysave.c b/src/bin/termptysave.c index db670a47..19615c7d 100644 --- a/src/bin/termptysave.c +++ b/src/bin/termptysave.c @@ -60,7 +60,10 @@ _alloc_new(int size, unsigned char gen) } } // out of slots for new blocks - no null blocks - if (firstnull < 0) return NULL; + if (firstnull < 0) { + ERR("Cannot find new null blocks"); + return NULL; + } // so allocate a new block size = MEM_BLOCK_PAGES * MEM_PAGE_SIZE; @@ -69,7 +72,10 @@ _alloc_new(int size, unsigned char gen) // get mmaped anonymous memory so when freed it goes away from the system ptr = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (ptr == MAP_FAILED) return NULL; + if (ptr == MAP_FAILED) { + ERR("Cannot allocate more memory with mmap MAP_ANONYMOUS"); + return NULL; + } // note - we SHOULD memset to 0, but we are assuming mmap anon give 0 pages //memset(ptr, 0, newsize);