small changes

This commit is contained in:
2026-02-25 09:56:20 +01:00
parent b78b4bc2cb
commit 4316cc57d3
2 changed files with 2 additions and 3 deletions

View File

@@ -117,8 +117,7 @@ static void luaArch_nnToLua(luaArch *arch, lua_State *L, size_t nnIdx) {
} }
static int luaArch_computer_freeMemory(lua_State *L) { static int luaArch_computer_freeMemory(lua_State *L) {
size_t freeMem = luaArch_from(L)->freeMem; lua_pushinteger(L, nn_getFreeMemory(luaArch_from(L)->computer));
lua_pushinteger(L, freeMem);
return 1; return 1;
} }

View File

@@ -1061,7 +1061,7 @@ int main(int argc, char **argv) {
nn_ComponentState *gputype = nn_createGPU(u, &nn_defaultGPUs[3], ne_gpu_handler, NULL); nn_ComponentState *gputype = nn_createGPU(u, &nn_defaultGPUs[3], ne_gpu_handler, NULL);
size_t ramTotal = 0; size_t ramTotal = 0;
ramTotal += nn_ramSizes[0]; ramTotal += nn_ramSizes[5];
nn_Computer *c = nn_createComputer(u, NULL, "computer0", ramTotal, 256, 256); nn_Computer *c = nn_createComputer(u, NULL, "computer0", ramTotal, 256, 256);
if(showStats) { if(showStats) {