<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/malloc_simple.c, branch v2018.01-rc1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>malloc_simple: Add debug statements to memalign_simple</title>
<updated>2017-01-28T19:04:34+00:00</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2017-01-27T16:39:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1923d54bfc2261948448a821d284f10566fde7fe'/>
<id>1923d54bfc2261948448a821d284f10566fde7fe</id>
<content type='text'>
Add debug statements to memalign_simple to match malloc_simple.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add debug statements to memalign_simple to match malloc_simple.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: Add a little more debugging</title>
<updated>2016-03-17T02:27:23+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-03-07T02:27:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a01cca75067496b28e9b81477e80953b7a96857'/>
<id>9a01cca75067496b28e9b81477e80953b7a96857</id>
<content type='text'>
Output the pointer returned by each call to malloc(). This can be useful
when debugging memory problems.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Output the pointer returned by each call to malloc(). This can be useful
when debugging memory problems.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.denx.de/u-boot-x86</title>
<updated>2015-10-22T00:47:40+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2015-10-22T00:47:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=858dbdf8412cefb6dbc4eed63dc3de9744578455'/>
<id>858dbdf8412cefb6dbc4eed63dc3de9744578455</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: Add debug() information</title>
<updated>2015-10-21T13:46:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-09-08T23:52:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=836ac74c29b04a18fc51c92a18e383cf18a36d63'/>
<id>836ac74c29b04a18fc51c92a18e383cf18a36d63</id>
<content type='text'>
It's useful to get a a trace of memory allocations in early init. Add a
debug() call to provide that. It can be enabled by adding '#define DEBUG'
to the top of the file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's useful to get a a trace of memory allocations in early init. Add a
debug() call to provide that. It can be enabled by adding '#define DEBUG'
to the top of the file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: Add Kconfig option for using only malloc_simple in the SPL</title>
<updated>2015-10-20T16:40:27+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-09-13T12:45:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1eb0c03c2198a7ec9de456b83dacdc4831b96cbf'/>
<id>1eb0c03c2198a7ec9de456b83dacdc4831b96cbf</id>
<content type='text'>
common/dlmalloc.c is quite big, both in .text and .data usage, therefor
on some boards the SPL is build to use only malloc_simple.c and not the
dlmalloc.c code. This is done in various include/configs/foo.h with the
following construct:

 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MALLOC_SIMPLE
 #endif

This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows
selecting this functionality through Kconfig instead.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
common/dlmalloc.c is quite big, both in .text and .data usage, therefor
on some boards the SPL is build to use only malloc_simple.c and not the
dlmalloc.c code. This is done in various include/configs/foo.h with the
following construct:

 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MALLOC_SIMPLE
 #endif

This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows
selecting this functionality through Kconfig instead.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: fix malloc_ptr calculation</title>
<updated>2015-09-28T14:15:48+00:00</updated>
<author>
<name>Philipp Rosenberger</name>
<email>ilu@linutronix.de</email>
</author>
<published>2015-09-08T10:41:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=596380db285a3f048bb47ca6507ea9de69bc2c7f'/>
<id>596380db285a3f048bb47ca6507ea9de69bc2c7f</id>
<content type='text'>
The gd-&gt;malloc_ptr and the gd-&gt;malloc_limit are offsets to gd-&gt;malloc_base.
But the addr variable contains the absolute address. The new_ptr must be:
addr + bytes - gd-&gt;malloc_base.

Signed-off-by: Philipp Rosenberger &lt;ilu@linutronix.de&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The gd-&gt;malloc_ptr and the gd-&gt;malloc_limit are offsets to gd-&gt;malloc_base.
But the addr variable contains the absolute address. The new_ptr must be:
addr + bytes - gd-&gt;malloc_base.

Signed-off-by: Philipp Rosenberger &lt;ilu@linutronix.de&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: Correct the alignment logic in memalign_simple()</title>
<updated>2015-08-28T16:33:14+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-08-14T19:26:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=972ea5339006e12a6c5d79f8c263ff5d1f463b30'/>
<id>972ea5339006e12a6c5d79f8c263ff5d1f463b30</id>
<content type='text'>
This should use the align parameter, not bytes. Natural alignment is one
use case but should not be the only one supported by this function.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should use the align parameter, not bytes. Natural alignment is one
use case but should not be the only one supported by this function.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a simple version of memalign()</title>
<updated>2015-06-11T01:26:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-05-12T20:55:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b6bfb6ff9a2173d5e0e5506b95631aa49396c468'/>
<id>b6bfb6ff9a2173d5e0e5506b95631aa49396c468</id>
<content type='text'>
This is used when the full malloc() is not available.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is used when the full malloc() is not available.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Make sure arch-specific map_sysmem() is defined</title>
<updated>2015-04-18T17:11:09+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2015-03-22T22:08:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0eb25b619699270a8af95c2f76791fd6c4b52972'/>
<id>0eb25b619699270a8af95c2f76791fd6c4b52972</id>
<content type='text'>
In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc_simple: Return NULL on malloc failure rather then calling panic()</title>
<updated>2015-02-12T17:35:29+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-02-04T12:05:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c8571703a3aacfb09defc35c42c6250a6746d58'/>
<id>2c8571703a3aacfb09defc35c42c6250a6746d58</id>
<content type='text'>
All callers of malloc should already do error checking, and may even be able
to continue without the alloc succeeding.

Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
common/built-in.o when building the SPL, triggering this gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
using malloc_simple in the first place.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All callers of malloc should already do error checking, and may even be able
to continue without the alloc succeeding.

Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
common/built-in.o when building the SPL, triggering this gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
using malloc_simple in the first place.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
