~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to iocore/cache/CacheDir.cc

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
546
546
          continue;
547
547
        }
548
548
      } else
549
 
        DDebug("dir_probe_tag", "tag mismatch %X %X vs expected %X", e, dir_tag(e), key->word(3));
 
549
        DDebug("dir_probe_tag", "tag mismatch %p %X vs expected %X", e, dir_tag(e), key->word(3));
550
550
    Lcont:
551
551
      p = e;
552
552
      e = next_dir(e, seg);
776
776
  while (b) {
777
777
    if (b->evac_frags.key == *key) {
778
778
      int res = dir_overwrite(key, d, &b->new_dir, &b->dir, false);
779
 
      DDebug("dir_lookaside", "fixup %X %X offset %d phase %d %d",
 
779
      DDebug("dir_lookaside", "fixup %X %X offset %"PRId64" phase %d %d",
780
780
            key->word(0), key->word(1), dir_offset(&b->new_dir), dir_phase(&b->new_dir), res);
781
781
      d->ram_cache->fixup(key, 0, dir_offset(&b->dir), 0, dir_offset(&b->new_dir));
782
782
      d->lookaside[i].remove(b);
820
820
  EvacuationBlock *b = d->lookaside[i].head;
821
821
  while (b) {
822
822
    if (b->evac_frags.key == *key) {
823
 
      DDebug("dir_lookaside", "remove %X %X offset %d phase %d",
 
823
      DDebug("dir_lookaside", "remove %X %X offset %"PRId64" phase %d",
824
824
            key->word(0), key->word(1), dir_offset(&b->new_dir), dir_phase(&b->new_dir));
825
825
      d->lookaside[i].remove(b);
826
826
      free_EvacuationBlock(b, d->mutex->thread_holding);
940
940
 
941
941
    if (buflen < dirlen) {
942
942
      if (buf)
943
 
        ink_memalign_free(buf);
944
 
      buf = (char *) ink_memalign(sysconf(_SC_PAGESIZE), dirlen);       // buf = (char*) valloc (dirlen);
 
943
        ats_memalign_free(buf);
 
944
      buf = (char *)ats_memalign(sysconf(_SC_PAGESIZE), dirlen);
945
945
      buflen = dirlen;
946
946
    }
947
947
 
961
961
  }
962
962
  Debug("cache_dir_sync", "sync done");
963
963
  if (buf)
964
 
    ink_memalign_free(buf);
 
964
    ats_memalign_free(buf);
965
965
}
966
966
 
967
967
 
981
981
  if (vol >= gnvol) {
982
982
    vol = 0;
983
983
    if (buf) {
984
 
      ink_memalign_free(buf);
 
984
      ats_memalign_free(buf);
985
985
      buf = 0;
986
986
      buflen = 0;
987
987
    }
1044
1044
      d->header->dirty = 0;
1045
1045
      if (buflen < dirlen) {
1046
1046
        if (buf)
1047
 
          ink_memalign_free(buf);
1048
 
        buf = (char *) ink_memalign(sysconf(_SC_PAGESIZE), dirlen);
 
1047
          ats_memalign_free(buf);
 
1048
        buf = (char *)ats_memalign(sysconf(_SC_PAGESIZE), dirlen);
1049
1049
        buflen = dirlen;
1050
1050
      }
1051
1051
      d->header->sync_serial++;
1096
1096
{
1097
1097
  NOWARN_UNUSED(fix);
1098
1098
  int hist[HIST_DEPTH + 1] = { 0 };
1099
 
  int *shist = (int*)xmalloc(segments * sizeof(int));
 
1099
  int *shist = (int*)ats_malloc(segments * sizeof(int));
1100
1100
  memset(shist, 0, segments * sizeof(int));
1101
1101
  int j;
1102
1102
  int stale = 0, full = 0, empty = 0;
1160
1160
      printf("\n" "                           ");
1161
1161
  }
1162
1162
  printf("\n");
1163
 
  ::xfree(shist);
 
1163
  ats_free(shist);
1164
1164
  return 0;
1165
1165
}
1166
1166