PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/pmvm/platform/pic24/heapsize.h

https://github.com/leaflabs/projects
C Header | 33 lines | 13 code | 3 blank | 17 comment | 1 complexity | 48e3c420c0786d5112a5135a26ffd03a MD5 | raw file
  1. /*
  2. # This file is Copyright 2010 Dean Hall.
  3. #
  4. # This file is part of the Python-on-a-Chip program.
  5. # Python-on-a-Chip is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
  7. #
  8. # Python-on-a-Chip is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
  12. # is seen in the file COPYING up one directory from this.
  13. */
  14. #ifndef _HEAPSIZE_H_
  15. #define _HEAPSIZE_H_
  16. #if __C30_VERSION__ == 325
  17. // v. 3.25 of the compiler reserves a 1K buffer for printf. And another 1K buffer somewhere,
  18. // it seems, perhaps for snprintf? Horrible. See http://www.microchip.com/forums/m538918.aspx
  19. // for some details. The next version is supposed to reduce this buffer size.
  20. #define HS 4800
  21. #else
  22. #define HS 6952
  23. #endif
  24. // Make room for the debugger if necessary
  25. #ifdef __DEBUG
  26. #define HEAP_SIZE (HS - 80)
  27. #else
  28. #define HEAP_SIZE HS
  29. #endif
  30. #endif /* _HEAPSIZE_H_ */