Skip to content

Commit

Permalink
Update allocator.h
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Jan 3, 2025
1 parent e429fea commit e950708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ namespace ncnn {
#elif NCNN_AVX
#define NCNN_MALLOC_ALIGN 32
#else
#define NCNN_MALLOC_ALIGN 16
#define NCNN_MALLOC_ALIGN 128
#endif

// we have some optimized kernels that may overread buffer a bit in loop
// it is common to interleave next-loop data load with arithmetic instructions
// allocating more bytes keeps us safe from SEGV_ACCERR failure
#define NCNN_MALLOC_OVERREAD 64
#define NCNN_MALLOC_OVERREAD 512

// Aligns a pointer to the specified number of bytes
// ptr Aligned pointer
Expand Down

0 comments on commit e950708

Please sign in to comment.