Forums - How are local arrays allocated on QDSP?

2 posts / 0 new
Last post
How are local arrays allocated on QDSP?
Edith
Join Date: 16 Mar 16
Posts: 11
Posted: Tue, 2016-06-28 08:11

I have following function call on DSP

void fun() {
int tmpbuf[0x88];
int tmp1buf[0x88]; 

FARF(HIGH, " -- DSP enter call_with_temp: tmp_buff 0x%x tmp1_buff 0x%x",  tmpbuf, tmp1buf);
FARF(HIGH, " -- DSP enter call_with_temp: size tmp_buff 0x%x size tmp1_buff 0x%x", sizeof(tmpbuf), sizeof(tmp1buf)); 

fun2(tmp_buff);
}

I expected tmpbuf and tmp1bug are allocated on the stack. What I can see is:

[08500/02]  58:25.010  80bb: -- DSP enter call_with_temp: tmp_buff 0xe235d490 tmp1_buff 0xe23614b0  1383  r4_fft.c
[08500/02]  58:25.010  80bb: -- DSP enter call_with_temp: size tmp_buff 0x220 size tmp1_buff 0x220  1384  r4_fft.c
 

The two addresses tmp1buf and tmpbuf differ ca 0x4000b while their size is 0x220b so they cannot be allocated on the stack I suppose.

What had happened? What should I familiarize with so this topic is clear to me?

Br,

Edyta

  • Up0
  • Down0
just4you
Profile picture
Join Date: 24 Jun 16
Location: south korea
Posts: 10
Posted: Thu, 2016-09-22 03:44

What's the matter?

I think the address would be fine.

 

It's not micro-controller.

you should learn about the MMU of ARM processor and Virtual Memory.

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.