summaryrefslogtreecommitdiff
path: root/src/xmalloc.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-07 13:47:35 +0100
committerPhil Jones <philj56@gmail.com>2022-06-07 15:31:49 +0100
commit51bbf779ba2c9d5954e2c9470a8eae7c1ddd38a5 (patch)
treef2b52f0211f9052fefa64e23c6a0d81305391589 /src/xmalloc.c
parent7562d7b539d8013376de2cff494231ba307f4ee1 (diff)
Switch from using (E)GL to wl_shm.
eglInitialize() is slow (~50-100ms), and uses a fair amount of memory (~100 MB). For such a small, simple program that just wants to launch as quickly as possible, wl_shm performs better.
Diffstat (limited to 'src/xmalloc.c')
-rw-r--r--src/xmalloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/xmalloc.c b/src/xmalloc.c
index 1c2a9dc..2bb07d2 100644
--- a/src/xmalloc.c
+++ b/src/xmalloc.c
@@ -8,7 +8,7 @@ void *xmalloc(size_t size)
void *ptr = malloc(size);
if (ptr != NULL) {
- //log_debug("Allocated %zu bytes.\n", size);
+ log_debug("Allocated %zu bytes.\n", size);
return ptr;
} else {
log_error("Out of memory, exiting.\n");
@@ -21,7 +21,7 @@ void *xcalloc(size_t nmemb, size_t size)
void *ptr = calloc(nmemb, size);
if (ptr != NULL) {
- //log_debug("Allocated %zux%zu bytes.\n", nmemb, size);
+ log_debug("Allocated %zux%zu bytes.\n", nmemb, size);
return ptr;
} else {
log_error("Out of memory, exiting.\n");
@@ -34,7 +34,7 @@ void *xrealloc(void *ptr, size_t size)
ptr = realloc(ptr, size);
if (ptr != NULL) {
- //log_debug("Reallocated to %zu bytes.\n", size);
+ log_debug("Reallocated to %zu bytes.\n", size);
return ptr;
} else {
log_error("Out of memory, exiting.\n");
@@ -47,7 +47,6 @@ char *xstrdup(const char *s)
char *ptr = strdup(s);
if (ptr != NULL) {
- //log_debug("Allocated %zu bytes.\n", size);
return ptr;
} else {
log_error("Out of memory, exiting.\n");