brintos

brintos / llvm-project-archived public Read only

0
0
Text · 491 B · c8ce846 Raw
22 lines · cpp
1// RUN: %clangxx_memprof %s -o %t2 3// RUN: %env_memprof_opts=print_text=true:log_path=stdout %run %t | FileCheck %s4 5#include <stdlib.h>6#include <unistd.h>7 8extern "C" {9void free_sized(void *ptr, size_t size);10void free_aligned_sized(void *ptr, size_t alignement, size_t size);11}12 13int main() {14  void *p = aligned_alloc(16, 32);15  free_aligned_sized(p, 16, 32);16  p = malloc(10);17  free_sized(p, 10);18  return 0;19}20// CHECK: Memory allocation stack id21// CHECK: Memory allocation stack id22