< prev index next >

src/hotspot/os/windows/os_perf_windows.cpp

Print this page
@@ -134,11 +134,11 @@
      *query = NULL;
    }
  }
  
  static CounterQueryP create_counter_query() {
-   CounterQueryP const query = NEW_C_HEAP_ARRAY(CounterQueryS, 1, mtInternal);
+   CounterQueryP const query = NEW_C_HEAP_OBJ(CounterQueryS, mtInternal);
    memset(query, 0, sizeof(CounterQueryS));
    return query;
  }
  
  static void destroy_counter_query(CounterQueryP query) {

@@ -146,11 +146,11 @@
    pdh_cleanup(&query->query.query, &query->counter);
    FREE_C_HEAP_ARRAY(CounterQueryS, query);
  }
  
  static MultiCounterQueryP create_multi_counter_query() {
-   MultiCounterQueryP const query = NEW_C_HEAP_ARRAY(MultiCounterQueryS, 1, mtInternal);
+   MultiCounterQueryP const query = NEW_C_HEAP_OBJ(MultiCounterQueryS, mtInternal);
    memset(query, 0, sizeof(MultiCounterQueryS));
    return query;
  }
  
  static void destroy_counter_query(MultiCounterQueryP counter_query) {

@@ -197,11 +197,11 @@
  static int allocate_counters(MultiCounterQueryP query, size_t nofCounters) {
    assert(query != NULL, "invariant");
    assert(!query->initialized, "invariant");
    assert(0 == query->noOfCounters, "invariant");
    assert(query->counters == NULL, "invariant");
-   query->counters = (HCOUNTER*)NEW_C_HEAP_ARRAY(char, nofCounters * sizeof(HCOUNTER), mtInternal);
+   query->counters = NEW_C_HEAP_ARRAY(HCOUNTER, nofCounters, mtInternal);
    if (query->counters == NULL) {
      return OS_ERR;
    }
    memset(query->counters, 0, nofCounters * sizeof(HCOUNTER));
    query->noOfCounters = (int)nofCounters;

@@ -386,11 +386,11 @@
  static ProcessQueryP create_process_query() {
    const int current_process_idx = current_query_index_for_process();
    if (OS_ERR == current_process_idx) {
      return NULL;
    }
-   ProcessQueryP const process_query = NEW_C_HEAP_ARRAY(ProcessQueryS, 1, mtInternal);
+   ProcessQueryP const process_query = NEW_C_HEAP_OBJ(ProcessQueryS, mtInternal);
    memset(process_query, 0, sizeof(ProcessQueryS));
    process_query->set.queries = NEW_C_HEAP_ARRAY(MultiCounterQueryS, current_process_idx + 1, mtInternal);
    memset(process_query->set.queries, 0, sizeof(MultiCounterQueryS) * (current_process_idx + 1));
    process_query->process_index = current_process_idx;
    process_query->set.size = current_process_idx + 1;
< prev index next >