Removing xenia/malloc.*

Using standard memory functions now.
This commit is contained in:
Ben Vanik
2014-08-20 22:22:47 -07:00
parent 609d7c755f
commit cecf83b7b7
36 changed files with 266 additions and 481 deletions

View File

@@ -67,7 +67,7 @@ X_STATUS XUserModule::LoadFromFile(const char* path) {
XEEXPECTZERO(result);
size_t buffer_length = file_info.file_length;
buffer = (uint8_t*)xe_malloc(buffer_length);
buffer = (uint8_t*)malloc(buffer_length);
// Open file for reading.
result = fs_entry->Open(kernel_state(), fs::Mode::READ, false, &file);
@@ -85,7 +85,7 @@ X_STATUS XUserModule::LoadFromFile(const char* path) {
XECLEANUP:
if (buffer) {
xe_free(buffer);
free(buffer);
}
if (file) {
file->Release();
@@ -99,8 +99,7 @@ X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
XenonRuntime* runtime = processor->runtime();
// Load the XEX into memory and decrypt.
xe_xex2_options_t xex_options;
xe_zero_struct(&xex_options, sizeof(xex_options));
xe_xex2_options_t xex_options = {0};
xex_ = xe_xex2_load(kernel_state()->memory(), addr, length, xex_options);
if (!xex_) {
return X_STATUS_UNSUCCESSFUL;