diff a/src/hotspot/os/windows/os_perf_windows.cpp b/src/hotspot/os/windows/os_perf_windows.cpp --- a/src/hotspot/os/windows/os_perf_windows.cpp +++ b/src/hotspot/os/windows/os_perf_windows.cpp @@ -142,15 +142,15 @@ } static void destroy_counter_query(CounterQueryP query) { assert(query != NULL, "invariant"); pdh_cleanup(&query->query.query, &query->counter); - FREE_C_HEAP_ARRAY(CounterQueryS, query); + FREE_C_HEAP_OBJ(query); } static MultiCounterQueryP create_multi_counter_query() { - MultiCounterQueryP const query = NEW_C_HEAP_OBJ(MultiCounterQueryS, mtInternal); + MultiCounterQueryP const query = NEW_C_HEAP_ARRAY(MultiCounterQueryS, 1, mtInternal); memset(query, 0, sizeof(MultiCounterQueryS)); return query; } static void destroy_counter_query(MultiCounterQueryP counter_query) { @@ -180,11 +180,11 @@ FREE_C_HEAP_ARRAY(MultiCounterQuerySetS, counter_query_set); } static void destroy_counter_query(ProcessQueryP process_query) { destroy_multi_counter_query(&process_query->set); - FREE_C_HEAP_ARRAY(ProcessQueryS, process_query); + FREE_C_HEAP_OBJ(process_query); } static int open_query(HQUERY* query) { return PdhDll::PdhOpenQuery(NULL, 0, query); }