Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFYn=yATkBn3E9eJ0XWdhitYsDe+_jvi8n_X-pRfajLTv7CRJg@mail.gmail.com>
Date: Tue, 27 Aug 2013 02:01:43 -0400
From: Yaniv Sapir <yaniv@...pteva.com>
To: john-dev@...ts.openwall.com
Subject: Re: Parallella: Litecoin mining

On Fri, Aug 9, 2013 at 10:04 AM, Rafael Waldo Delgado Doblas <
lord.rafa@...il.com> wrote:

> Hello,
>
> ...
>


> I would like to know in there a way to allocate dynamic memory on an
> specific address in order to avoid do this:
>
> volatile shared_buf_t M[16] SECTION("shared_dram");
>
> Because I really don’t need an 16 elements array per core I just need an
> single element in an specific address.
>
> Regards,
> Rafael.
>

Rafael, if this question is still relevant, then yes, you can dynamically
allocate memory using standard malloc(). However, malloc() (and other
functions using its mechanism, like printf()) cannot be placed in internal
memory and have to be executed from external mem, which is a bad thing
w.r.t performance of critical code.

That said, I think that "to allocate dynamic memory on an specific address"
is kinda contradiction, since "specific" and "dynamic" do not work
together... If what you're looking for is a memory region at a specific
address, but who's life period is limited (i.e., the region can be reused
for other purposes), then use pointers set to those "specific addresses"
instead of static allocation of buffers.

Yaniv.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.