#include "util/u_debug.h"
#include "util/u_memory.h"
#include "util/u_format.h"
+#include "util/ralloc.h"
#include "vc4_screen.h"
#include "vc4_context.h"
static void
vc4_screen_destroy(struct pipe_screen *pscreen)
{
- free(pscreen);
+ ralloc_free(pscreen);
}
static int
struct pipe_screen *
vc4_screen_create(int fd)
{
- struct vc4_screen *screen = CALLOC_STRUCT(vc4_screen);
+ struct vc4_screen *screen = ralloc(NULL, struct vc4_screen);
struct pipe_screen *pscreen;
pscreen = &screen->base;
#ifdef USE_VC4_SIMULATOR
#include "util/u_memory.h"
+#include "util/ralloc.h"
#include "vc4_screen.h"
#include "vc4_context.h"
vc4_simulator_init(struct vc4_screen *screen)
{
screen->simulator_mem_size = 256 * 1024 * 1024;
- screen->simulator_mem_base = malloc(screen->simulator_mem_size);
+ screen->simulator_mem_base = ralloc_size(screen,
+ screen->simulator_mem_size);
/* We supply our own memory so that we can have more aperture
* available (256MB instead of simpenrose's default 64MB).