diff VMS.c @ 174:c3f458403cd6

Always allocate more than 256 byte, measurements removed in master loop, aligned slots
author Merten Sach <msach@mailbox.tu-berlin.de>
date Tue, 20 Dec 2011 16:50:21 +0100
parents bfaebdf60df3
children de5e7c522f1f
line diff
     1.1 --- a/VMS.c	Tue Dec 20 15:39:30 2011 +0100
     1.2 +++ b/VMS.c	Tue Dec 20 16:50:21 2011 +0100
     1.3 @@ -187,11 +187,13 @@
     1.4   { SchedSlot  **schedSlots;
     1.5     int i;
     1.6  
     1.7 -   schedSlots  = VMS__malloc( NUM_SCHED_SLOTS * sizeof(SchedSlot *) );
     1.8 +   //schedSlots  = VMS__malloc( NUM_SCHED_SLOTS * sizeof(SchedSlot *) );
     1.9 +   posix_memalign(&schedSlots, CACHELINE_SIZE, NUM_SCHED_SLOTS * sizeof(SchedSlot *));
    1.10  
    1.11     for( i = 0; i < NUM_SCHED_SLOTS; i++ )
    1.12      {
    1.13 -      schedSlots[i] = VMS__malloc( sizeof(SchedSlot) );
    1.14 +      //schedSlots[i] = VMS__malloc( sizeof(SchedSlot) );
    1.15 +       posix_memalign(&schedSlots[i], CACHELINE_SIZE, sizeof(SchedSlot) );
    1.16  
    1.17           //Set state to mean "handling requests done, slot needs filling"
    1.18        schedSlots[i]->workIsDone         = FALSE;
    1.19 @@ -590,8 +592,8 @@
    1.20        // itself
    1.21        //Note, should not stack-allocate initial data -- no guarantee, in
    1.22        // general that creating processor will outlive ones it creates.
    1.23 -   //VMS__free( animatingPr->startOfStack );
    1.24 -   //VMS__free( animatingPr );
    1.25 +   free( animatingPr->startOfStack );
    1.26 +   free( animatingPr );
    1.27   }
    1.28  
    1.29