cvsuser     01/09/15 04:26:31

  Modified:    .        memory.c
  Log:
  Fixed to match the coding standards.
  
  Courtesy of: Gibbs Tanton - tgibbs <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.8       +50 -25    parrot/memory.c
  
  Index: memory.c
  ===================================================================
  RCS file: /home/perlcvs/parrot/memory.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- memory.c  2001/09/14 14:20:13     1.7
  +++ memory.c  2001/09/15 11:26:31     1.8
  @@ -1,12 +1,22 @@
   /* Memory.c
  - *
  - *  Handle memory allocation
  - *
  + *  Copyright: (When this is determined...it will go here)
  + *  CVS Info
  + *     $RCSfile: memory.c,v $
  + *     $Revision: 1.8 $
  + *     $Date: 2001/09/15 11:26:31 $
  + *  Overview:
  + *     The memory (mem) API handles memory allocation
  + *  Data Structure and Algorithms:
  + *  History:
  + *  Notes:
  + *  References:
    */
   
   #include "parrot/parrot.h"
   
  -/* Allocate a chunk of memory aligned on a power-of-2 boundary */
  +/*=for api mem mem_allocate_aligned
  +   Allocate a chunk of memory aligned on a power-of-2 boundary
  +*/
   void *
   mem_allocate_aligned(IV size) {
     IV max_to_alloc;
  @@ -20,7 +30,8 @@
       if (size > i) {
         mask = ~(i*2 - 1);
         max_to_alloc = i*4;
  -    } else {
  +        }
  +        else {
         break;
       }
     }
  @@ -32,13 +43,27 @@
     return mem;
   }
   
  +/*=for api mem mem_sys_allocate
  +   uses malloc to allocate system memory
  +*/
   void *
   mem_sys_allocate(IV size) {
     return malloc(size);
   }
   
  +/*=for api mem mem_setup_allocator
  +   initializes the allocator
  +*/
   void
   mem_setup_allocator(struct Perl_Interp *interpreter) {
   }
  -
     
  +/*
  + * Local variables:
  + * c-indentation-style: bsd
  + * c-basic-offset: 4
  + * indent-tabs-mode: nil 
  + * End:
  + *
  + * vim: expandtab shiftwidth=4:
  +*/
  
  
  

Reply via email to