Advertisement
Guest User

Untitled

a guest
Jun 5th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. old way:
  2.  
  3. allocateMemory()
  4. {
  5.     a = allocate_vector(1, N);
  6.     b = allocate_vector(1, N);
  7.     c = allocate_vector(1, N);
  8. }
  9.  
  10. deallocateMemory()
  11. {
  12.     free_vector(a, 1, N);
  13.     free_vector(b, 1, N);
  14.     free_vector(c, 1, N);
  15. }
  16.  
  17.  
  18.  
  19. new way (I want to expand to the above):
  20.  
  21. ?
  22. {
  23.     ALLOC_DEALLOC(a, 1, N);
  24.     ALLOC_DEALLOC(b, 1, N);
  25.     ALLOC_DEALLOC(c, 1, N);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement