/* tmalloc.c (emx+gcc) -- Copyright (c) 1993 by Eberhard Mattes */

#include <sys/emx.h>
#include <stdlib.h>
#include "malloc2.h"

void *_tmalloc (size_t size)
{
  void *p;

  if (size > MAX_SIZE)
    return (NULL);
  if (rover == NULL && !_malloc_init ())
    return (NULL);
  HEAP_LOCK;
  p = _malloc2 (size, TRUE, TRUE);
  HEAP_UNLOCK;
  return (p);
}
