<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/firmware/core_alloc.c, branch 2048sp5</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Make a few local variables static</title>
<updated>2015-01-11T17:02:43+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2015-01-11T17:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=cfbd9cb22fc1499c3b2f8207d72dce4cb388e09f'/>
<id>cfbd9cb22fc1499c3b2f8207d72dce4cb388e09f</id>
<content type='text'>
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve core_alloc() / buflib_alloc() documentation</title>
<updated>2015-01-02T17:51:15+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2015-01-02T17:41:30+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=66df5f3891779f8d55dd5afba1db466cea2cc2e9'/>
<id>66df5f3891779f8d55dd5afba1db466cea2cc2e9</id>
<content type='text'>
Document the fact that buffers are movable by default.
Care must be taken to not pass them to functions that yield().

Also clarify other things:
- Passing NULL as "ops" to buflib_alloc_ex() causes
  buffers to be movable by default (but not shrinkable).

- If you want shrinkable buffers during compaction,
  you have to provide a shrink callback.

- To disable buffer movement, you have to pass NULL
  for the move_callback inside the callback structure.

- The concept of default callbacks was removed
  long ago, remove the only reference of it.

Change-Id: I3bf0ea6b08b507d80a19f3c2c835aca32b3f7800
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Document the fact that buffers are movable by default.
Care must be taken to not pass them to functions that yield().

Also clarify other things:
- Passing NULL as "ops" to buflib_alloc_ex() causes
  buffers to be movable by default (but not shrinkable).

- If you want shrinkable buffers during compaction,
  you have to provide a shrink callback.

- To disable buffer movement, you have to pass NULL
  for the move_callback inside the callback structure.

- The concept of default callbacks was removed
  long ago, remove the only reference of it.

Change-Id: I3bf0ea6b08b507d80a19f3c2c835aca32b3f7800
</pre>
</div>
</content>
</entry>
<entry>
<title>buflib: Properly support allocations without any name, to avoid wasting space</title>
<updated>2014-02-02T18:40:38+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-02-02T13:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=4ce1deacfd4e5440cc82237ebc5fafbaeea64763'/>
<id>4ce1deacfd4e5440cc82237ebc5fafbaeea64763</id>
<content type='text'>
in micro-allocation scenarios.

Change-Id: I97a065bcfba8e0fda9b1670445e839e267c769c8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in micro-allocation scenarios.

Change-Id: I97a065bcfba8e0fda9b1670445e839e267c769c8
</pre>
</div>
</content>
</entry>
<entry>
<title>hosted: Substract more than 256K from total memory pool.</title>
<updated>2014-02-02T15:59:29+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-01-28T06:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=a11c6a532b00be687dfc61b269114ae70616bc28'/>
<id>a11c6a532b00be687dfc61b269114ae70616bc28</id>
<content type='text'>
These 256K are intended to account for the binary size which reduces the total
available RAM on native targets. 256K is really outdated though, 768K should be
more accurate (for the majority of targets).

Change-Id: Iab3ee51d42ae15b1b7efb8588881579cf1948ae7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These 256K are intended to account for the binary size which reduces the total
available RAM on native targets. 256K is really outdated though, 768K should be
more accurate (for the majority of targets).

Change-Id: Iab3ee51d42ae15b1b7efb8588881579cf1948ae7
</pre>
</div>
</content>
</entry>
<entry>
<title>buflib: Add crc field protecting buflib cookie integrity</title>
<updated>2014-01-16T09:17:39+00:00</updated>
<author>
<name>Marcin Bukat</name>
<email>marcin.bukat@gmail.com</email>
</author>
<published>2014-01-09T20:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=7ab237b025cbb4c25d345604da32e894379c1721'/>
<id>7ab237b025cbb4c25d345604da32e894379c1721</id>
<content type='text'>
This should catch the case of buffer misuse which results
in corrupted cookie of next allocation. The check is performed
on move_block() so it may be a bit late.

There is buflib_check_valid() provided which checks the
integrity of all cookies for given context.
On DEBUG build with --sdl-thread this check is carried out
for core_ctx on every context switch to catch problems earlier.

Change-Id: I999d4576084592394e3dbd3bdf0f32935ff5f601
Reviewed-on: http://gerrit.rockbox.org/711
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should catch the case of buffer misuse which results
in corrupted cookie of next allocation. The check is performed
on move_block() so it may be a bit late.

There is buflib_check_valid() provided which checks the
integrity of all cookies for given context.
On DEBUG build with --sdl-thread this check is carried out
for core_ctx on every context switch to catch problems earlier.

Change-Id: I999d4576084592394e3dbd3bdf0f32935ff5f601
Reviewed-on: http://gerrit.rockbox.org/711
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>buflib: Change buflib_available() and add buflib_allocatable().</title>
<updated>2013-07-07T08:46:07+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2013-05-29T05:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=af4e408555659f42db5b8c9a1d6a68143b2328da'/>
<id>af4e408555659f42db5b8c9a1d6a68143b2328da</id>
<content type='text'>
buflib_allocatable() is what buflib_available() was before (it was in fact
simply renamed). It returns the largest contiguous block of memory. This
can be allocated and will definitely succeed, although larger allocations
may also succeed if the buffer can be compacted and shrinked.

buflib_available() now counts all free bytes, contiguous or not. This
better matches the description and how the caller use it.

Change-Id: I511e4eb5f4cf1821d957b3f4ef8a685ce40fe289
Reviewed-on: http://gerrit.rockbox.org/481
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
Tested-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
buflib_allocatable() is what buflib_available() was before (it was in fact
simply renamed). It returns the largest contiguous block of memory. This
can be allocated and will definitely succeed, although larger allocations
may also succeed if the buffer can be compacted and shrinked.

buflib_available() now counts all free bytes, contiguous or not. This
better matches the description and how the caller use it.

Change-Id: I511e4eb5f4cf1821d957b3f4ef8a685ce40fe289
Reviewed-on: http://gerrit.rockbox.org/481
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
Tested-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Integrate the warble tool in the regular build system.</title>
<updated>2012-03-03T19:19:08+00:00</updated>
<author>
<name>Frank Gevaerts</name>
<email>frank@gevaerts.be</email>
</author>
<published>2012-03-03T18:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=466a7c6a405f80cd8e01ebf0a70eb406863a38f1'/>
<id>466a7c6a405f80cd8e01ebf0a70eb406863a38f1</id>
<content type='text'>
Only sdl app builds work properly for now.

Change-Id: I7807d42f69b8577b401e48cdc63de71e54f49217
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only sdl app builds work properly for now.

Change-Id: I7807d42f69b8577b401e48cdc63de71e54f49217
</pre>
</div>
</content>
</entry>
<entry>
<title>FS#12412 : Delete old buffer allocation code which has been replaced by core_alloc, and move buffer setup code to core_alloc.c</title>
<updated>2011-11-29T00:42:27+00:00</updated>
<author>
<name>Boris Gjenero</name>
<email>dreamlayers@rockbox.org</email>
</author>
<published>2011-11-29T00:42:27+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d51e5983357593981e604b05ad3826f2496f4a6b'/>
<id>d51e5983357593981e604b05ad3826f2496f4a6b</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>core_alloc: Provide a tiny test allocation, which can be freed for debug purposes.</title>
<updated>2011-10-05T18:32:19+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2011-10-05T18:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=4478b25ede0129b1572145737627db7297dcc89f'/>
<id>4478b25ede0129b1572145737627db7297dcc89f</id>
<content type='text'>
This allocation can be freed in the buflib debug menu (select it to free).
Doing a another allocation, e.g. by selecting another item in this debug menu
will cause compaction (all allocs move).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30719 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allocation can be freed in the buflib debug menu (select it to free).
Doing a another allocation, e.g. by selecting another item in this debug menu
will cause compaction (all allocs move).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30719 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>GSoC/Buflib: Enable compaction in buflib.</title>
<updated>2011-08-30T14:01:45+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2011-08-30T14:01:45+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=baa070cca6d459a7c5aed81f29e4cc4f6c7410b3'/>
<id>baa070cca6d459a7c5aed81f29e4cc4f6c7410b3</id>
<content type='text'>
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.

For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.

lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.

For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.

lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
</feed>
