Index: uspace/drv/uhci-hcd/Makefile
===================================================================
--- uspace/drv/uhci-hcd/Makefile	(revision fcbcaae942a73b291d86a5f577ce215f8ace8f1c)
+++ uspace/drv/uhci-hcd/Makefile	(revision fb2de0a2a2edf15bde22d66749486082b5dddb68)
@@ -48,5 +48,4 @@
 	root_hub.c \
 	hw_struct/transfer_descriptor.c \
-	utils/slab.c \
 	pci.c \
 	batch.c
Index: uspace/drv/uhci-hcd/utils/malloc32.h
===================================================================
--- uspace/drv/uhci-hcd/utils/malloc32.h	(revision fcbcaae942a73b291d86a5f577ce215f8ace8f1c)
+++ uspace/drv/uhci-hcd/utils/malloc32.h	(revision fb2de0a2a2edf15bde22d66749486082b5dddb68)
@@ -41,6 +41,4 @@
 #include <as.h>
 
-#include "slab.h"
-
 #define UHCI_STRCUTURES_ALIGNMENT 16
 #define UHCI_REQUIRED_PAGE_SIZE 4096
@@ -70,9 +68,17 @@
  */
 static inline void * malloc32(size_t size) {
-	if (size <= SLAB_ELEMENT_SIZE)
-		return slab_malloc_g();
-	usb_log_warning("Requested %zu bytes, current allocator can't handle "
-	    "that amount, pray that the standard malloc will suffice.", size);
-	return memalign(UHCI_STRCUTURES_ALIGNMENT, size);
+	/* This works only when the host has less than 4GB of memory as
+	 * physical address needs to fit into 32 bits */
+
+	/* If we need more than one page there is no guarantee that the
+	 * memory will be continuous */
+	if (size > PAGE_SIZE)
+		return NULL;
+	/* Calculate alignment to make sure the block won't cross page
+	 * boundary */
+	size_t alignment = UHCI_STRCUTURES_ALIGNMENT;
+	while (alignment < size)
+		alignment *= 2;
+	return memalign(alignment, size);
 }
 /*----------------------------------------------------------------------------*/
@@ -84,6 +90,4 @@
 	if (!addr)
 		return;
-	if (slab_in_range_g(addr))
-		return slab_free_g(addr);
 	free(addr);
 }
Index: pace/drv/uhci-hcd/utils/slab.c
===================================================================
--- uspace/drv/uhci-hcd/utils/slab.c	(revision fcbcaae942a73b291d86a5f577ce215f8ace8f1c)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup drvusbuhcihc
- * @{
- */
-/** @file
- * @brief UHCI driver
- */
-#include <as.h>
-#include <assert.h>
-#include <fibril_synch.h>
-#include <usb/debug.h>
-
-#include "slab.h"
-
-#define SLAB_SIZE (PAGE_SIZE * 16)
-#define SLAB_ELEMENT_COUNT (SLAB_SIZE / SLAB_ELEMENT_SIZE)
-
-typedef struct slab {
-	void *page;
-	bool slabs[SLAB_ELEMENT_COUNT];
-	fibril_mutex_t guard;
-} slab_t;
-
-static slab_t global_slab;
-
-static void * slab_malloc(slab_t *intance);
-static bool slab_in_range(slab_t *intance, void *addr);
-static void slab_free(slab_t *intance, void *addr);
-/*----------------------------------------------------------------------------*/
-void * slab_malloc_g(void)
-{
-	return slab_malloc(&global_slab);
-}
-/*----------------------------------------------------------------------------*/
-void slab_free_g(void *addr)
-{
-	return slab_free(&global_slab, addr);
-}
-/*----------------------------------------------------------------------------*/
-bool slab_in_range_g(void *addr)
-{
-	return slab_in_range(&global_slab, addr);
-}
-/*----------------------------------------------------------------------------*/
-static void slab_init(slab_t *instance)
-{
-	static FIBRIL_MUTEX_INITIALIZE(init_mutex);
-	assert(instance);
-	fibril_mutex_lock(&init_mutex);
-	if (instance->page != NULL) {
-		/* already initialized */
-		fibril_mutex_unlock(&init_mutex);
-		return;
-	}
-	fibril_mutex_initialize(&instance->guard);
-	size_t i = 0;
-	for (;i < SLAB_ELEMENT_COUNT; ++i) {
-		instance->slabs[i] = true;
-	}
-	instance->page = as_get_mappable_page(SLAB_SIZE);
-	if (instance->page != NULL) {
-		void* ret =
-		    as_area_create(instance->page, SLAB_SIZE, AS_AREA_READ | AS_AREA_WRITE);
-		if (ret != instance->page) {
-			instance->page = NULL;
-		}
-	}
-	memset(instance->page, 0xa, SLAB_SIZE);
-	fibril_mutex_unlock(&init_mutex);
-	usb_log_debug2("SLAB initialized at %p.\n", instance->page);
-}
-/*----------------------------------------------------------------------------*/
-static void * slab_malloc(slab_t *instance) {
-	assert(instance);
-	if (instance->page == NULL)
-		slab_init(instance);
-
-	fibril_mutex_lock(&instance->guard);
-	void *addr = NULL;
-	size_t i = 0;
-	for (; i < SLAB_ELEMENT_COUNT; ++i) {
-		if (instance->slabs[i]) {
-			instance->slabs[i] = false;
-			addr = (instance->page + (i * SLAB_ELEMENT_SIZE));
-			break;
-		}
-	}
-	fibril_mutex_unlock(&instance->guard);
-
-	return addr;
-}
-/*----------------------------------------------------------------------------*/
-static bool slab_in_range(slab_t *instance, void *addr) {
-	assert(instance);
-	bool in_range = (instance->page != NULL) &&
-		(addr >= instance->page) && (addr < instance->page + SLAB_SIZE);
-	return in_range;
-}
-/*----------------------------------------------------------------------------*/
-static void slab_free(slab_t *instance, void *addr)
-{
-	assert(instance);
-	assert(slab_in_range(instance, addr));
-	memset(addr, 0xa, SLAB_ELEMENT_SIZE);
-
-	const size_t pos = (addr - instance->page) /  SLAB_ELEMENT_SIZE;
-
-	fibril_mutex_lock(&instance->guard);
-	assert(instance->slabs[pos] == false);
-	instance->slabs[pos] = true;
-	fibril_mutex_unlock(&instance->guard);
-}
-/**
- * @}
- */
Index: pace/drv/uhci-hcd/utils/slab.h
===================================================================
--- uspace/drv/uhci-hcd/utils/slab.h	(revision fcbcaae942a73b291d86a5f577ce215f8ace8f1c)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/** @addtogroup drvusbuhcihc
- * @{
- */
-/** @file
- * @brief UHCI driver
- */
-#ifndef DRV_UHCI_UTILS_SLAB_H
-#define DRV_UHCI_UTILS_SLAB_H
-
-#include <bool.h>
-
-#define SLAB_ELEMENT_SIZE 1024
-
-void * slab_malloc_g(void);
-
-void slab_free_g(void *addr);
-
-bool slab_in_range_g(void *addr);
-
-#endif
-/**
- * @}
- */
