zftape-buffers.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _FTAPE_DYNMEM_H
  2. #define _FTAPE_DYNMEM_H
  3. /*
  4. * Copyright (C) 1995-1997 Claus-Justus Heine.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; see the file COPYING. If not, write to
  15. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  16. *
  17. * $Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-buffers.h,v $
  18. * $Revision: 1.2 $
  19. * $Date: 1997/10/05 19:18:59 $
  20. *
  21. * memory allocation routines.
  22. *
  23. */
  24. /* we do not allocate all of the really large buffer memory before
  25. * someone tries to open the drive. ftape_open() may fail with
  26. * -ENOMEM, but that's better having 200k of vmalloced memory which
  27. * cannot be swapped out.
  28. */
  29. extern void zft_memory_stats(void);
  30. extern int zft_vmalloc_once(void *new, size_t size);
  31. extern int zft_vcalloc_once(void *new, size_t size);
  32. extern int zft_vmalloc_always(void *new, size_t size);
  33. extern void zft_vfree(void *old, size_t size);
  34. extern void *zft_kmalloc(size_t size);
  35. extern void zft_kfree(void *old, size_t size);
  36. /* called by cleanup_module()
  37. */
  38. extern void zft_uninit_mem(void);
  39. #endif