View Single Post
Old 12-17-2003, 03:37 PM   #30 (permalink)
charliex
Junkie
 
Location: North Hollywood
where to start

PHP Code:
  for(i=0;i<numServers[currentPeriod-1];i++){
          
//if server i is in B, update remaining work, update the delay
          
if(workRemain[i] > 0){
                  
workRemain[i] -= timeToNextEvent;
                  
delta[i][currentPeriod-1] -= (timeToNextEvent/serviceRate);
          }
  } 
the delta[i][] = is the prime suspect so far, check your code to make sure that you have the space you think you do for the stored data.



PHP Code:
  delta.resize(maxServers);
  for(
i=0i<maxServers;i++){
    
delta[i].resize(totalPeriods);
  } 
I can't decide if just VCs vector class trying to be clever, but in here lies a dangling pointer, since its just a resize its probably ok though.
charliex is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73