Skip to content

Commit b2461bf

Browse files
committed
Merge branch 'windows/build' into windows/online
test=develop
2 parents 2435460 + 3f73c0a commit b2461bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paddle/fluid/memory/allocation/cpu_allocator.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#pragma once
1616
#include "paddle/fluid/memory/allocation/allocator.h"
1717

18+
#ifdef _WIN32
19+
#define posix_memalign_free _aligned_free
20+
#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ? 0 : errno)
21+
#endif
22+
1823
namespace paddle {
1924
namespace memory {
2025
namespace allocation {

0 commit comments

Comments
 (0)