Stop LeakSanitizer complaining about Uxn's RAM.
This commit is contained in:
parent
9024963de1
commit
f48a09c482
|
@ -133,13 +133,16 @@ load(Uxn *u, char *filepath)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Uint8 *memory;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Uxn u;
|
Uxn u;
|
||||||
int i, loaded = 0;
|
int i, loaded = 0;
|
||||||
|
|
||||||
if(!uxn_boot(&u, (Uint8 *)calloc(0xffff, sizeof(Uint8))))
|
memory = (Uint8 *)calloc(0xffff, sizeof(Uint8));
|
||||||
|
if(!uxn_boot(&u, memory))
|
||||||
return error("Boot", "Failed");
|
return error("Boot", "Failed");
|
||||||
|
|
||||||
/* system */ devsystem = uxn_port(&u, 0x0, system_dei, system_deo);
|
/* system */ devsystem = uxn_port(&u, 0x0, system_dei, system_deo);
|
||||||
|
|
|
@ -271,10 +271,12 @@ load(Uxn *u, char *rom)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Uint8 *memory;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
start(Uxn *u, char *rom)
|
start(Uxn *u, char *rom)
|
||||||
{
|
{
|
||||||
Uint8 *memory = (Uint8 *)calloc(0xffff, sizeof(Uint8));
|
memory = (Uint8 *)calloc(0xffff, sizeof(Uint8));
|
||||||
if(!uxn_boot(u, memory))
|
if(!uxn_boot(u, memory))
|
||||||
return error("Boot", "Failed to start uxn.");
|
return error("Boot", "Failed to start uxn.");
|
||||||
if(!load(u, rom))
|
if(!load(u, rom))
|
||||||
|
|
Loading…
Reference in New Issue