UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
612 Views
Registered: ‎09-19-2017

sds_alloc can only allocate up to 128KB

Jump to solution

Hello

I created my own SDSoC platform on the DP-8020 board (XCZU2EG-2SFVA625I). I ran a 32x32 matrix multiply-addition example and it worked fine. But when I use sds_alloc to allocate more than 128KB of memory, although it can compile, but the runtime will report an error.

Is this somewhere wrong when I create the SDSoC platform, or is it limited by tools or chips?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
467 Views
Registered: ‎09-19-2017

回复: sds_alloc can only allocate up to 128KB

Jump to solution

后面发现是我的DDR配错了,重新配置过就正常了

View solution in original post

7 Replies
Moderator
Moderator
583 Views
Registered: ‎08-20-2018

Re: sds_alloc can only allocate up to 128KB

Jump to solution

Hi @lucas_zyq 

There is no limitation as such.

1. Have you used sds_free() ?

2. What is the error?

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Adventurer
Adventurer
576 Views
Registered: ‎09-19-2017

Re: sds_alloc can only allocate up to 128KB

Jump to solution

Hi, @nutang 

the test code:

int main(int argc, char **argv)
{
    .......
    printf("----debug-0-----\n");
    signed char *sds_ptr = (signed char *)sds_alloc(sizeof(signed char) * 129* 1024);

    ......
}

Runtime phenomenon:

When I allocate 128×1024 or less, it can run normally. However, when it exceeds 128×1024, it will report an error. Phenomenon: 1. Direct Linux kernel crashes. 2. Output “Internal error: Undefined command: 0 [#1] SMP", the kernel then crashes (when the allocation is far more than 128 × 1024, such as 1024 × 1024)

Thanks!

0 Kudos
Moderator
Moderator
573 Views
Registered: ‎08-20-2018

Re: sds_alloc can only allocate up to 128KB

Jump to solution

Hi @lucas_zyq 

Please use sds_free() then it should not happen.

 

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Adventurer
Adventurer
564 Views
Registered: ‎09-19-2017

Re: sds_alloc can only allocate up to 128KB

Jump to solution

@nutang ,

I did use sds_free() when I no longer need this memory.

By the way, as long as the program runs to this location and the allocated memory is greater than 128*1024, the kernel collapses.

 

0 Kudos
Adventurer
Adventurer
561 Views
Registered: ‎09-19-2017

Re: sds_alloc can only allocate up to 128KB

Jump to solution

The direct cause of the problem is the size of memory allocated by sds_alloc

0 Kudos
Moderator
Moderator
551 Views
Registered: ‎08-20-2018

Re: sds_alloc can only allocate up to 128KB

Jump to solution

Hi @lucas_zyq 

Okay. Got it.

Let me check other possiblities and get back to you.

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Highlighted
Adventurer
Adventurer
468 Views
Registered: ‎09-19-2017

回复: sds_alloc can only allocate up to 128KB

Jump to solution

后面发现是我的DDR配错了,重新配置过就正常了

View solution in original post