Index: kernel/generic/src/adt/cht.c
===================================================================
--- kernel/generic/src/adt/cht.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/adt/cht.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -573,5 +573,5 @@
 	size_t bytes =
 	    sizeof(cht_buckets_t) + (bucket_cnt - 1) * sizeof(marked_ptr_t);
-	cht_buckets_t *b = malloc(bytes, can_block ? 0 : FRAME_ATOMIC);
+	cht_buckets_t *b = can_block ? nfmalloc(bytes) : malloc(bytes);
 
 	if (!b)
Index: kernel/generic/src/adt/hash_table.c
===================================================================
--- kernel/generic/src/adt/hash_table.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/adt/hash_table.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -401,5 +401,5 @@
 	assert(pbuckets && HT_MIN_BUCKETS <= bucket_cnt);
 
-	list_t *buckets = malloc(bucket_cnt * sizeof(list_t), FRAME_ATOMIC);
+	list_t *buckets = malloc(bucket_cnt * sizeof(list_t));
 	if (!buckets)
 		return false;
Index: kernel/generic/src/cap/cap.c
===================================================================
--- kernel/generic/src/cap/cap.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/cap/cap.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -126,6 +126,5 @@
 errno_t caps_task_alloc(task_t *task)
 {
-	task->cap_info = (cap_info_t *) malloc(sizeof(cap_info_t),
-	    FRAME_ATOMIC);
+	task->cap_info = (cap_info_t *) malloc(sizeof(cap_info_t));
 	if (!task->cap_info)
 		return ENOMEM;
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/console/cmd.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -1465,6 +1465,5 @@
 		return true;
 
-	uint64_t *data = (uint64_t *) malloc(sizeof(uint64_t) * cnt,
-	    FRAME_ATOMIC);
+	uint64_t *data = (uint64_t *) malloc(sizeof(uint64_t) * cnt);
 	if (data == NULL) {
 		printf("Error allocating memory for statistics\n");
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/console/console.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -411,5 +411,5 @@
 
 	if (size > 0) {
-		data = (char *) malloc(size + 1, FRAME_ATOMIC);
+		data = (char *) malloc(size + 1);
 		if (!data)
 			return (sys_errno_t) ENOMEM;
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/console/kconsole.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -219,5 +219,5 @@
 	const char *hint;
 	const char *help;
-	char *output = malloc(MAX_CMDLINE, 0);
+	char *output = nfmalloc(MAX_CMDLINE);
 	size_t hints_to_show = MAX_TAB_HINTS - 1;
 	size_t total_hints_shown = 0;
@@ -298,5 +298,5 @@
 		end++;
 
-	tmp = malloc(STR_BOUNDS(end - start + 1), FRAME_ATOMIC);
+	tmp = malloc(STR_BOUNDS(end - start + 1));
 	if (!tmp)
 		return NULL;
@@ -332,5 +332,5 @@
 	wchar_t *current = history[history_pos];
 	current[0] = 0;
-	char *tmp = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
+	char *tmp = nfmalloc(STR_BOUNDS(MAX_CMDLINE));
 
 	while (true) {
@@ -810,5 +810,5 @@
 		printf("Type \"exit\" to leave the console.\n");
 
-	char *cmdline = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
+	char *cmdline = nfmalloc(STR_BOUNDS(MAX_CMDLINE));
 	while (true) {
 		wchar_t *tmp = clever_readline((char *) prompt, stdin);
Index: kernel/generic/src/cpu/cpu.c
===================================================================
--- kernel/generic/src/cpu/cpu.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/cpu/cpu.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -65,6 +65,5 @@
 #endif /* CONFIG_SMP */
 
-		cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count,
-		    FRAME_ATOMIC);
+		cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count);
 		if (!cpus)
 			panic("Cannot allocate CPU structures.");
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/ipc/ipc.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -118,5 +118,11 @@
 	if (!call)
 		return NULL;
-	kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t), flags);
+
+	kobject_t *kobj;
+	if (flags & FRAME_ATOMIC)
+		kobj = (kobject_t *) malloc(sizeof(kobject_t));
+	else
+		kobj = (kobject_t *) nfmalloc(sizeof(kobject_t));
+
 	if (!kobj) {
 		slab_free(call_cache, call);
Index: kernel/generic/src/ipc/ipcrsc.c
===================================================================
--- kernel/generic/src/ipc/ipcrsc.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/ipc/ipcrsc.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -168,5 +168,5 @@
 			return ENOMEM;
 		}
-		kobject_t *kobj = malloc(sizeof(kobject_t), FRAME_ATOMIC);
+		kobject_t *kobj = malloc(sizeof(kobject_t));
 		if (!kobj) {
 			cap_free(TASK, handle);
Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/ipc/irq.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -82,5 +82,5 @@
 {
 	/* Copy the physical base addresses aside. */
-	uintptr_t *pbase = malloc(rangecount * sizeof(uintptr_t), FRAME_ATOMIC);
+	uintptr_t *pbase = malloc(rangecount * sizeof(uintptr_t));
 	if (!pbase)
 		return ENOMEM;
@@ -227,5 +227,5 @@
 	irq_cmd_t *cmds = NULL;
 
-	irq_code_t *code = malloc(sizeof(*code), FRAME_ATOMIC);
+	irq_code_t *code = malloc(sizeof(*code));
 	if (!code)
 		return NULL;
@@ -238,6 +238,5 @@
 		goto error;
 
-	ranges = malloc(sizeof(code->ranges[0]) * code->rangecount,
-	    FRAME_ATOMIC);
+	ranges = malloc(sizeof(code->ranges[0]) * code->rangecount);
 	if (!ranges)
 		goto error;
@@ -247,5 +246,5 @@
 		goto error;
 
-	cmds = malloc(sizeof(code->cmds[0]) * code->cmdcount, FRAME_ATOMIC);
+	cmds = malloc(sizeof(code->cmds[0]) * code->cmdcount);
 	if (!cmds)
 		goto error;
@@ -356,5 +355,5 @@
 	}
 
-	kobject_t *kobject = malloc(sizeof(kobject_t), FRAME_ATOMIC);
+	kobject_t *kobject = malloc(sizeof(kobject_t));
 	if (!kobject) {
 		cap_free(TASK, handle);
Index: kernel/generic/src/ipc/ops/dataread.c
===================================================================
--- kernel/generic/src/ipc/ops/dataread.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/ipc/ops/dataread.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -75,5 +75,5 @@
 			IPC_SET_ARG1(answer->data, dst);
 
-			answer->buffer = malloc(size, FRAME_ATOMIC);
+			answer->buffer = malloc(size);
 			if (!answer->buffer) {
 				IPC_SET_RETVAL(answer->data, ENOMEM);
Index: kernel/generic/src/ipc/ops/datawrite.c
===================================================================
--- kernel/generic/src/ipc/ops/datawrite.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/ipc/ops/datawrite.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -56,5 +56,5 @@
 	}
 
-	call->buffer = (uint8_t *) malloc(size, FRAME_ATOMIC);
+	call->buffer = (uint8_t *) malloc(size);
 	if (!call->buffer)
 		return ENOMEM;
Index: kernel/generic/src/lib/gsort.c
===================================================================
--- kernel/generic/src/lib/gsort.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/lib/gsort.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -111,5 +111,5 @@
 
 	if (elem_size > IBUF_SIZE) {
-		slot = (void *) malloc(elem_size, FRAME_ATOMIC);
+		slot = (void *) malloc(elem_size);
 		if (!slot)
 			return false;
Index: kernel/generic/src/lib/ra.c
===================================================================
--- kernel/generic/src/lib/ra.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/lib/ra.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -124,5 +124,5 @@
 	unsigned int i;
 
-	span = (ra_span_t *) malloc(sizeof(ra_span_t), FRAME_ATOMIC);
+	span = (ra_span_t *) malloc(sizeof(ra_span_t));
 	if (!span)
 		return NULL;
@@ -132,6 +132,5 @@
 	span->size = size;
 
-	span->free = (list_t *) malloc((span->max_order + 1) * sizeof(list_t),
-	    FRAME_ATOMIC);
+	span->free = (list_t *) malloc((span->max_order + 1) * sizeof(list_t));
 	if (!span->free) {
 		free(span);
@@ -205,5 +204,5 @@
 	ra_arena_t *arena;
 
-	arena = (ra_arena_t *) malloc(sizeof(ra_arena_t), FRAME_ATOMIC);
+	arena = (ra_arena_t *) malloc(sizeof(ra_arena_t));
 	if (!arena)
 		return NULL;
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/lib/str.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -634,5 +634,5 @@
 {
 	size_t size = str_size(src) + 1;
-	char *dest = malloc(size, 0);
+	char *dest = nfmalloc(size);
 	assert(dest);
 
@@ -667,5 +667,5 @@
 		size = n;
 
-	char *dest = malloc(size + 1, 0);
+	char *dest = nfmalloc(size + 1);
 	assert(dest);
 
Index: kernel/generic/src/log/log.c
===================================================================
--- kernel/generic/src/log/log.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/log/log.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -307,5 +307,5 @@
 	switch (operation) {
 	case KLOG_WRITE:
-		data = (char *) malloc(size + 1, FRAME_ATOMIC);
+		data = (char *) malloc(size + 1);
 		if (!data)
 			return (sys_errno_t) ENOMEM;
@@ -326,5 +326,5 @@
 		return EOK;
 	case KLOG_READ:
-		data = (char *) malloc(size, FRAME_ATOMIC);
+		data = (char *) malloc(size);
 		if (!data)
 			return (sys_errno_t) ENOMEM;
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/main/kinit.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -209,5 +209,5 @@
 		size_t arguments_size = str_size(arguments);
 
-		void *arguments_copy = malloc(arguments_size, FRAME_ATOMIC);
+		void *arguments_copy = malloc(arguments_size);
 		if (arguments_copy == NULL)
 			continue;
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/mm/as.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -620,5 +620,5 @@
 	}
 
-	as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t), FRAME_ATOMIC);
+	as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t));
 	if (!area) {
 		mutex_unlock(&as->lock);
@@ -650,6 +650,5 @@
 	 */
 	if (!(attrs & AS_AREA_ATTR_PARTIAL)) {
-		si = (share_info_t *) malloc(sizeof(share_info_t),
-		    FRAME_ATOMIC);
+		si = (share_info_t *) malloc(sizeof(share_info_t));
 		if (!si) {
 			free(area);
@@ -1302,6 +1301,5 @@
 
 	/* An array for storing frame numbers */
-	uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t),
-	    FRAME_ATOMIC);
+	uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t));
 	if (!old_frame) {
 		mutex_unlock(&area->lock);
@@ -2260,5 +2258,5 @@
 
 	size_t isize = area_cnt * sizeof(as_area_info_t);
-	as_area_info_t *info = malloc(isize, 0);
+	as_area_info_t *info = nfmalloc(isize);
 
 	/* Second pass, record data. */
Index: kernel/generic/src/mm/backend_phys.c
===================================================================
--- kernel/generic/src/mm/backend_phys.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/mm/backend_phys.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -160,6 +160,5 @@
 		phys_shared_data_t *data;
 
-		data = (phys_shared_data_t *) malloc(sizeof(*data),
-		    FRAME_ATOMIC);
+		data = (phys_shared_data_t *) malloc(sizeof(*data));
 		if (!data)
 			return false;
Index: kernel/generic/src/mm/slab.c
===================================================================
--- kernel/generic/src/mm/slab.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/mm/slab.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -954,5 +954,5 @@
 }
 
-void *malloc(size_t size, unsigned int flags)
+static void *_malloc(size_t size, unsigned int flags)
 {
 	assert(_slab_initialized);
@@ -967,5 +967,18 @@
 }
 
-void *realloc(void *ptr, size_t size, unsigned int flags)
+void *malloc(size_t size)
+{
+	return _malloc(size, FRAME_ATOMIC);
+}
+
+/** Non-failing malloc.
+ *  Never returns NULL, but may block forever if no memory is available.
+ */
+void *nfmalloc(size_t size)
+{
+	return _malloc(size, 0);
+}
+
+static void *_realloc(void *ptr, size_t size, unsigned int flags)
 {
 	assert(_slab_initialized);
@@ -994,4 +1007,9 @@
 }
 
+void *realloc(void *ptr, size_t size)
+{
+	return _realloc(ptr, size, FRAME_ATOMIC);
+}
+
 void free(void *ptr)
 {
Index: kernel/generic/src/proc/program.c
===================================================================
--- kernel/generic/src/proc/program.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/proc/program.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -72,5 +72,5 @@
 {
 	uspace_arg_t *kernel_uarg = (uspace_arg_t *)
-	    malloc(sizeof(uspace_arg_t), FRAME_ATOMIC);
+	    malloc(sizeof(uspace_arg_t));
 	if (!kernel_uarg)
 		return ENOMEM;
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/proc/thread.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -949,5 +949,5 @@
 	 */
 	uspace_arg_t *kernel_uarg =
-	    (uspace_arg_t *) malloc(sizeof(uspace_arg_t), FRAME_ATOMIC);
+	    (uspace_arg_t *) malloc(sizeof(uspace_arg_t));
 	if (!kernel_uarg)
 		return (sys_errno_t) ENOMEM;
Index: kernel/generic/src/synch/futex.c
===================================================================
--- kernel/generic/src/synch/futex.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/synch/futex.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -156,5 +156,5 @@
 void futex_task_init(struct task *task)
 {
-	task->futexes = malloc(sizeof(struct futex_cache), 0);
+	task->futexes = nfmalloc(sizeof(struct futex_cache));
 
 	cht_create(&task->futexes->ht, 0, 0, 0, true, &task_futex_ht_ops);
@@ -339,5 +339,5 @@
 static futex_t *get_and_cache_futex(uintptr_t phys_addr, uintptr_t uaddr)
 {
-	futex_t *futex = malloc(sizeof(futex_t), FRAME_ATOMIC);
+	futex_t *futex = malloc(sizeof(futex_t));
 	if (!futex)
 		return NULL;
@@ -365,5 +365,5 @@
 	 * Cache the link to the futex object for this task.
 	 */
-	futex_ptr_t *fut_ptr = malloc(sizeof(futex_ptr_t), FRAME_ATOMIC);
+	futex_ptr_t *fut_ptr = malloc(sizeof(futex_ptr_t));
 	if (!fut_ptr) {
 		spinlock_lock(&futex_ht_lock);
Index: kernel/generic/src/synch/workqueue.c
===================================================================
--- kernel/generic/src/synch/workqueue.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/synch/workqueue.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -187,6 +187,5 @@
 struct work_queue *workq_create(const char *name)
 {
-	struct work_queue *workq = malloc(sizeof(struct work_queue),
-	    FRAME_ATOMIC);
+	struct work_queue *workq = malloc(sizeof(struct work_queue));
 	if (!workq)
 		return NULL;
Index: kernel/generic/src/sysinfo/stats.c
===================================================================
--- kernel/generic/src/sysinfo/stats.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/sysinfo/stats.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -101,5 +101,5 @@
 
 	/* Assumption: config.cpu_count is constant */
-	stats_cpu_t *stats_cpus = (stats_cpu_t *) malloc(*size, FRAME_ATOMIC);
+	stats_cpu_t *stats_cpus = (stats_cpu_t *) malloc(*size);
 	if (stats_cpus == NULL) {
 		*size = 0;
@@ -307,5 +307,5 @@
 	}
 
-	stats_task_t *stats_tasks = (stats_task_t *) malloc(*size, FRAME_ATOMIC);
+	stats_task_t *stats_tasks = (stats_task_t *) malloc(*size);
 	if (stats_tasks == NULL) {
 		/* No free space for allocation */
@@ -413,5 +413,5 @@
 	}
 
-	stats_thread_t *stats_threads = (stats_thread_t *) malloc(*size, FRAME_ATOMIC);
+	stats_thread_t *stats_threads = (stats_thread_t *) malloc(*size);
 	if (stats_threads == NULL) {
 		/* No free space for allocation */
@@ -479,5 +479,5 @@
 		/* Allocate stats_task_t structure */
 		stats_task_t *stats_task =
-		    (stats_task_t *) malloc(sizeof(stats_task_t), FRAME_ATOMIC);
+		    (stats_task_t *) malloc(sizeof(stats_task_t));
 		if (stats_task == NULL) {
 			irq_spinlock_unlock(&tasks_lock, true);
@@ -550,5 +550,5 @@
 		/* Allocate stats_thread_t structure */
 		stats_thread_t *stats_thread =
-		    (stats_thread_t *) malloc(sizeof(stats_thread_t), FRAME_ATOMIC);
+		    (stats_thread_t *) malloc(sizeof(stats_thread_t));
 		if (stats_thread == NULL) {
 			irq_spinlock_unlock(&threads_lock, true);
@@ -592,5 +592,5 @@
 
 	stats_exc_t *stats_exceptions =
-	    (stats_exc_t *) malloc(*size, FRAME_ATOMIC);
+	    (stats_exc_t *) malloc(*size);
 	if (stats_exceptions == NULL) {
 		/* No free space for allocation */
@@ -670,5 +670,5 @@
 		/* Allocate stats_exc_t structure */
 		stats_exc_t *stats_exception =
-		    (stats_exc_t *) malloc(sizeof(stats_exc_t), FRAME_ATOMIC);
+		    (stats_exc_t *) malloc(sizeof(stats_exc_t));
 		if (stats_exception == NULL)
 			return ret;
@@ -713,5 +713,5 @@
 
 	stats_physmem_t *stats_physmem =
-	    (stats_physmem_t *) malloc(*size, FRAME_ATOMIC);
+	    (stats_physmem_t *) malloc(*size);
 	if (stats_physmem == NULL) {
 		*size = 0;
@@ -743,5 +743,5 @@
 		return NULL;
 
-	load_t *stats_load = (load_t *) malloc(*size, FRAME_ATOMIC);
+	load_t *stats_load = (load_t *) malloc(*size);
 	if (stats_load == NULL) {
 		*size = 0;
Index: kernel/generic/src/sysinfo/sysinfo.c
===================================================================
--- kernel/generic/src/sysinfo/sysinfo.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/sysinfo/sysinfo.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -649,5 +649,5 @@
 		return ret;
 
-	char *path = (char *) malloc(size + 1, 0);
+	char *path = (char *) nfmalloc(size + 1);
 	assert(path);
 
@@ -716,5 +716,5 @@
 		} else {
 			/* Allocate buffer for subkeys */
-			char *names = (char *) malloc(size, FRAME_ATOMIC);
+			char *names = (char *) malloc(size);
 			if (names == NULL)
 				return ret;
@@ -758,5 +758,5 @@
 		return ret;
 
-	char *path = (char *) malloc(size + 1, 0);
+	char *path = (char *) nfmalloc(size + 1);
 	assert(path);
 
Index: kernel/generic/src/udebug/udebug_ops.c
===================================================================
--- kernel/generic/src/udebug/udebug_ops.c	(revision 7473807b2cbcf501c8b807c52295d1ef0e1e9f37)
+++ kernel/generic/src/udebug/udebug_ops.c	(revision 11b285d87da6e1d6a1d65134694b4f971f3cdebc)
@@ -370,5 +370,5 @@
 
 	/* Allocate a buffer to hold thread IDs */
-	sysarg_t *id_buffer = malloc(buf_size + 1, FRAME_ATOMIC);
+	sysarg_t *id_buffer = malloc(buf_size + 1);
 	if (!id_buffer)
 		return ENOMEM;
@@ -434,5 +434,5 @@
 	size_t name_size = str_size(TASK->name) + 1;
 
-	*data = malloc(name_size, FRAME_ATOMIC);
+	*data = malloc(name_size);
 	if (!*data)
 		return ENOMEM;
@@ -476,5 +476,5 @@
 
 	/* Prepare a buffer to hold the arguments. */
-	sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), FRAME_ATOMIC);
+	sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t));
 	if (!arg_buffer) {
 		_thread_op_end(thread);
@@ -522,5 +522,5 @@
 
 	/* Prepare a buffer to hold the data. */
-	istate_t *state_buf = malloc(sizeof(istate_t), FRAME_ATOMIC);
+	istate_t *state_buf = malloc(sizeof(istate_t));
 	if (!state_buf) {
 		_thread_op_end(thread);
@@ -558,5 +558,5 @@
 	}
 
-	void *data_buffer = malloc(n, FRAME_ATOMIC);
+	void *data_buffer = malloc(n);
 	if (!data_buffer) {
 		mutex_unlock(&TASK->udebug.lock);
