malloc-simple.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) 2009 Openmoko Inc.
  3. *
  4. * Authors Marek Lindner <marek@openmoko.com>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef MALLOC_H
  20. #define MALLOC_H
  21. #include <inttypes.h>
  22. /* add your tag here */
  23. enum {
  24. MEM_TAG_UNUSED,
  25. MEM_TAG_DECOMP_M1,
  26. MEM_TAG_DECOMP_M2,
  27. MEM_TAG_DECOMP_F1,
  28. MEM_TAG_DECOMP_F2,
  29. MEM_TAG_DECOMP_F3,
  30. MEM_TAG_ARTICLE_F1,
  31. MEM_TAG_INDEX_M1,
  32. MEM_TAG_WOMR_M1,
  33. MEM_TAG_WOMR_F1,
  34. MEM_TAG_WOMR_F2,
  35. MEM_TAG_PERF_M1,
  36. MEM_TAG_PERF_M2,
  37. MEM_TAG_PERF_M3,
  38. MEM_TAG_PERF_M4,
  39. MEM_TAG_PERF_M5,
  40. MEM_TAG_PERF_F1,
  41. MEM_TAG_PERF_F2,
  42. MEM_TAG_PERF_F3,
  43. MEM_TAG_PERF_F4,
  44. MEM_TAG_PERF_F5,
  45. MEM_TAG_PERF_F6,
  46. MEM_TAG_PERF_F7,
  47. };
  48. void malloc_init_simple(void);
  49. void *malloc_simple(uint32_t size, uint32_t tag);
  50. void free_simple(void *ptr, uint32_t tag);
  51. void malloc_status_simple(void);
  52. #endif /* MALLOC_H */