19-max-allocate.patch 686 B

12345678910111213141516171819202122232425
  1. Author: Fabian Greffrath <fabian+debian@greffrath.com>
  2. Description: Allocate a whole 16 MB at once instead of iterating in
  3. 128 kB steps. Thanks again, Jakub Wilk.
  4. Bug-Debian: https://bugs.debian.org/775508
  5. --- a/source/base/all/memory/lin.c
  6. +++ b/source/base/all/memory/lin.c
  7. @@ -22,6 +22,7 @@ struct rusage ru;
  8. Buf = NULL;
  9. +#if 0
  10. while (Size < BASE_MEMORY_EXTERN_MaxMemoryRequirement()
  11. && (NewBuf = (char*) realloc(Buf, Size + STEP)))
  12. {
  13. @@ -48,6 +49,8 @@ struct rusage ru;
  14. free(Buf);
  15. BASE_MEMORY.MaxAllocate = Size;
  16. +#endif
  17. + BASE_MEMORY.MaxAllocate = BASE_MEMORY_EXTERN_MaxMemoryRequirement();
  18. BASE_MEMORY_InitAlloc();
  19. }