[riot-notifications] [RIOT-OS/RIOT] sys/oneway-malloc: only allocate word-aligned chunks (#15844)

Francisco notifications at github.com
Mon Jan 25 10:15:13 CET 2021

@fjmolinas approved this pull request.

ACK, I'm able to reproduce the failure and the patch works as advertised. AFAIK `malloc` will usually align the block, so this change makes sense IMO. If there is a case for configuring `ARCHITECTURE_WORD_MASK` then ignore my comment, otherwise please squash right away.

main(): This is RIOT! (Version: 2021.04-devel-92-g4cc6c2-HEAD)
Allocated 129 Bytes at 0x0x20000980, total 129

Context before hardfault:
   r0: 0x20000a01
   r1: 0x00000000
   r2: 0x20000200
   r3: 0x00000000
  r12: 0x00000000
   lr: 0x08000b97
   pc: 0x080001da
  psr: 0x41000000

 CFSR: 0x01000000
 HFSR: 0x40000000
 DFSR: 0x00000008
 AFSR: 0x00000000
EXC_RET: 0xfffffffd
Active thread: 1 "main"
Attempting to reconstruct state for debugging...
  set $pc=0x80001da
  frame 0

Allocated 129 Bytes at 0x0x20013d64, total 77260
Allocated 129 Bytes at 0x0x20013df0, total 77397
Allocated 129 Bytes at 0x0x20013e7c, total 77534
Allocated 129 Bytes at 0x0x20013f08, total 77671
Allocations count: 567
Free 129 Bytes at 0x0x20013df0, total 282
Free 129 Bytes at 0x0x20013e7c, total 145
Free 129 Bytes at 0x0x20013f08, total 8
Allocations count: 0

@benpicco do you think a `oneway-malloc` test could be added as well?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210125/11a88e35/attachment-0001.htm>

More information about the notifications mailing list