berry workaround for broken realloc on OpenBK7231N (#1649)

* berry workaround for broken realloc on OpenBK7231N

I ran `addRepeatingEvent 1 -1 testRealloc 100` on a OpenBK7231N device
and it failed. This is the same problem as #1563.

This might be related to mysterious crashes I was getting while
importing big modules like this:
`addRepeatingEvent 1 1 berry import modulename`.

* fix
This commit is contained in:
Bartosz Nitka
2025-05-25 17:44:06 +02:00
committed by GitHub
parent 46fe6736ca
commit e1456181e8

View File

@ -232,7 +232,7 @@
#define BE_EXPLICIT_MALLOC malloc
#define BE_EXPLICIT_FREE free
// normal realloc appears broken on OpenBK7231T: #1563, #298
#ifdef PLATFORM_BK7231T
#if defined(PLATFORM_BK7231T) || defined(PLATFORM_BK7231N)
#define BE_EXPLICIT_REALLOC os_realloc
#else
#define BE_EXPLICIT_REALLOC realloc