elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
libc
/
malloc
/
noise.c
File editor
#if VERBOSE #include <errno.h> #include <string.h> #include <unistd.h> #include "_malloc.h" /* NB: Careful here, stdio may use malloc - so we can't */ static void phex(unsigned int val) { static char hex[] = "0123456789ABCDEF"; int i; for (i = sizeof(unsigned int) * 8 - 4; i >= 0; i -= 4) write(2, hex + ((val >> i) & 0xF), 1); } void __noise(char *str, mem __wcnear *ptr) { int saved_errno = errno; write(2, "Malloc ", 7); phex(ptr? (unsigned int)m_size(ptr): 0); write(2, " ptr ", 5); phex((int)ptr); write(2, " nxt ", 5); phex(ptr? (unsigned int)m_next(ptr): 0); write(2, " ", 1); write(2, str, strlen(str)); write(2, "\n", 1); errno = saved_errno; } #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history