Standard setup for writing C inspired by Casey Muratori, Ryan Fleury, Mr. 4th Programmer, and others in the handmade community.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

22 rindas
372 B

  1. #ifndef OS_IMPL_WIN32_CPP
  2. #define OS_IMPL_WIN32_CPP
  3. #include "os.h"
  4. #include "Windows.h"
  5. void *os_alloc(size_t commitSize) {
  6. return VirtualAlloc(NULL, commitSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
  7. }
  8. void os_reserve(void *ptr) {
  9. }
  10. void os_decommit(void *ptr) {
  11. }
  12. void os_free(void *ptr, size_t size) {
  13. VirtualFree(ptr, NULL, MEM_RELEASE);
  14. }
  15. #endif