@@ -532,8 +532,8 @@ static duk_ret_t el_ledcWrite(duk_context *ctx)
532
532
533
533
static duk_ret_t info (duk_context * ctx )
534
534
{
535
- size_t internal = heap_caps_get_free_size (MALLOC_CAP_INTERNAL );
536
- size_t external = heap_caps_get_free_size (MALLOC_CAP_SPIRAM );
535
+ size_t internal = heap_caps_get_free_size (MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL );
536
+ size_t external = heap_caps_get_free_size (MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
537
537
538
538
jslog (INFO , "INTERNAL MEMORY HEAP INFO FREE: %d" , internal );
539
539
jslog (INFO , "EXTERNAL MEMORY HEAP INFO FREE: %d" , external );
@@ -631,7 +631,7 @@ IRAM_ATTR void *duk_spiram_malloc(void *udata, size_t size)
631
631
{
632
632
if (spiramAvailable )
633
633
{
634
- return heap_caps_malloc (size , MALLOC_CAP_SPIRAM );
634
+ return heap_caps_malloc (size , MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
635
635
}
636
636
else
637
637
{
@@ -647,7 +647,7 @@ IRAM_ATTR void *duk_spiram_realloc(void *udata, void *ptr, size_t size)
647
647
{
648
648
if (spiramAvailable )
649
649
{
650
- return heap_caps_realloc (ptr , size , MALLOC_CAP_SPIRAM );
650
+ return heap_caps_realloc (ptr , size , MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
651
651
}
652
652
else
653
653
{
@@ -677,7 +677,7 @@ IRAM_ATTR void spiram_free(void *ptr)
677
677
678
678
bool spiramAvail ()
679
679
{
680
- void * ptr = heap_caps_malloc (1 , MALLOC_CAP_SPIRAM );
680
+ void * ptr = heap_caps_malloc (1 , MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
681
681
if (ptr != NULL )
682
682
{
683
683
heap_caps_free (ptr );
0 commit comments