<p>fixeria <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/14939">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">src/db.c: integrate SQLite3 with talloc allocator<br><br>This change introduces an optional feature that allows to make<br>SQLite3 use talloc for all internal allocations. This would<br>facilitate finding memleaks. OsmoHLR needs to be configured<br>with '--enable-sqlite-talloc'.<br><br>  full talloc report on 'OsmoHLR' (total 292168 bytes in 449 blocks)<br>    struct osmo_gsup_server        contains    162 bytes in   3 blocks (ref 0)<br>      ...<br>    struct db_context              contains 288407 bytes in 420 blocks (ref 0)<br>      hlr.db                       contains      7 bytes in   1 blocks (ref 0)<br>    SQLite3                        contains 288192 bytes in 418 blocks (ref 0)<br>      db.c:95                      contains     48 bytes in   1 blocks (ref 0)<br>      db.c:95                      contains      2 bytes in   1 blocks (ref 0)<br>      ...<br><br>Unfortunately, old SQLite3 versions (such as 3.8.2) run out<br>of memory when trying to initialize a new database:<br><br>  DDB ERROR  db.c:88 (7) statement aborts at 3: []<br>  DDB ERROR  db.c:420 Unable to set Write-Ahead Logging: out of memory<br>  DDB ERROR  db.c:88 (7) statement aborts at 3: []<br>  DDB ERROR  db.c:238 Unable to prepare SQL statement<br>             'SELECT name FROM sqlite_master WHERE type='table' AND name=?'<br>  ...<br><br>I've noticed a huge difference in heap usage footprint compared to<br>generic malloc. At the same time, the recent versions (at least<br>3.24.0), work just fine.<br><br>Change-Id: Icfe67ed0f063b63e6794f9516da3003d01cf20a7<br>---<br>M configure.ac<br>M src/Makefile.am<br>M src/db.c<br>M src/db.h<br>A src/db_debug.c<br>M tests/db/Makefile.am<br>6 files changed, 126 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/39/14939/3</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/14939">change 14939</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-hlr/+/14939"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icfe67ed0f063b63e6794f9516da3003d01cf20a7 </div>
<div style="display:none"> Gerrit-Change-Number: 14939 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>