Skip to content

Commit

Permalink
annotate alloc on unixes. (#548)
Browse files Browse the repository at this point in the history
* annotate `alloc` on unixes.

* changes from feedback
  • Loading branch information
devnexen authored Sep 25, 2022
1 parent 591dc4c commit a060462
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/snmalloc/mem/localalloc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#ifdef _MSC_VER
# define ALLOCATOR __declspec(allocator)
#if defined(_MSC_VER)
# define ALLOCATOR __declspec(allocator) __declspec(restrict)
#elif __has_attribute(malloc)
# define ALLOCATOR __attribute__((malloc))
#else
# define ALLOCATOR
#endif
Expand Down

0 comments on commit a060462

Please sign in to comment.