Added pluggable memory allocator and threading stub.

This commit is contained in:
Camilla Berglund
2011-03-07 14:09:13 +01:00
parent cf7819df8d
commit ccbb956341
8 changed files with 92 additions and 14 deletions
+2 -2
View File
@@ -360,7 +360,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
return NULL;
}
window = (_GLFWwindow*) malloc(sizeof(_GLFWwindow));
window = (_GLFWwindow*) _glfwMalloc(sizeof(_GLFWwindow));
if (!window)
{
_glfwSetError(GLFW_OUT_OF_MEMORY, "glfwOpenWindow: Failed to allocate window structure");
@@ -692,7 +692,7 @@ GLFWAPI void glfwCloseWindow(GLFWwindow handle)
*prev = window->next;
}
free(window);
_glfwFree(window);
}