Skip to content

Commit 71b8be9

Browse files
bug fix
1 parent c084b97 commit 71b8be9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cores/ArduinOS/ArduinOS/Heap4.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ mission critical applications that require provable dependability.
9797
#include "Task.h"
9898

9999

100-
//ヒープ領域の初期化. 初めにヒープ領域を使用する前に呼ぶ必要がある.
101-
//Initialises the heap structures before their firt use.
100+
// ヒープ領域の初期化. 初めにヒープ領域を使用する前に呼ぶ必要がある.
101+
// Initialises the heap structures before their firt use.
102102
static void HeapInit(void);
103103

104104
// Allocate the memory for the heap.
@@ -137,8 +137,7 @@ struct BlockLink
137137
typedef struct BlockLink BlockLink;
138138

139139
// アライメントされた構造体のサイズ
140-
static const size_t heapStructSize = (sizeof(BlockLink) + ((size_t)(PORT_BYTE_ALIGNMENT - 1)))
141-
& ~((size_t)PORT_BYTE_ALIGNMENT);
140+
static const size_t heapStructSize = (sizeof(BlockLink) + ((size_t)(PORT_BYTE_ALIGNMENT - 1))) & ~((size_t)PORT_BYTE_ALIGNMENT_MASK);
142141

143142
#define HEAP_MINIMUM_BLOCK_SIZE ((size_t) (heapStructSize << 1))
144143

0 commit comments

Comments
 (0)