* Function to retrieve data for heap on given socket */
| 233 | * Function to retrieve data for heap on given socket |
| 234 | */ |
| 235 | int |
| 236 | rte_malloc_get_socket_stats(int socket, |
| 237 | struct rte_malloc_socket_stats *socket_stats) |
| 238 | { |
| 239 | struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config; |
| 240 | int heap_idx; |
| 241 | |
| 242 | heap_idx = malloc_socket_to_heap_id(socket); |
| 243 | if (heap_idx < 0) |
| 244 | return -1; |
| 245 | |
| 246 | return malloc_heap_get_stats(&mcfg->malloc_heaps[heap_idx], |
| 247 | socket_stats); |
| 248 | } |
| 249 | |
| 250 | /* |
| 251 | * Function to dump contents of all heaps |