25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
570 B

  1. #ifndef OS_H
  2. #define OS_H
  3. #include "core.h"
  4. // ### Memory ###
  5. void *os_alloc(size_t capacity);
  6. void os_reserve(void *ptr);
  7. void os_decommit(void *ptr);
  8. void os_free(void *ptr, size_t freeSize);
  9. // ### File IO ###
  10. string os_readEntireFile(Arena *arena, string filename);
  11. bool os_writeEntireFile(Arena *arena, string filename, const byte *contents, size_t contentsLength);
  12. bool os_fileAppend(Arena *arena, string filename, const byte *contents, size_t contentsLength);
  13. // ### Standard IO ###
  14. void os_log(LogTarget target, const char *fmt, va_list argList);
  15. #endif