billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=adb2d8404294dd986aa8b14dcdf84ab7c239f5e3

commit adb2d8404294dd986aa8b14dcdf84ab7c239f5e3
Author: Anisse Astier <ani...@astier.eu>
Date:   Fri Sep 5 18:00:08 2014 +0200

    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 6a9204b..88f88c2 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 db670a4..19615c7 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);

-- 


Reply via email to