<p>I am not sure yet about how to deal with this one.</p>
<p>I agree that there is space to reuse some code for hash tables in shared memory, but I feel that we should have dedicated code for it, not to mix it with the one in pkg memory. It will avoid all these if checks to lock/unlock, as we use hash tables to speed up search, it feels we need to keep it optimised.</p>
<p>Moreover, iirc and hope not to confuse with other api, some of the macros are even now used for hash tables in memory, just that the lock/unlock of the slot is done in the implementation code, not in the core code.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1535#issuecomment-391630806">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZVpYeqLMCb9cRsCtGtj6cEuXSYJoks5t1m2SgaJpZM4UD1EW">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZZSZmI1RRh9y1sxLb4cR6gW01bdrks5t1m2SgaJpZM4UD1EW.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/kamailio/kamailio/pull/1535#issuecomment-391630806","url":"https://github.com/kamailio/kamailio/pull/1535#issuecomment-391630806","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1535: I am not sure yet about how to deal with this one.\r\n\r\nI agree that there is space to reuse some code for hash tables in shared memory, but I feel that we should have dedicated code for it, not to mix it with the one in pkg memory. It will avoid all these if checks to lock/unlock, as we use hash tables to speed up search, it feels we need to keep it optimised.\r\n\r\nMoreover, iirc and hope not to confuse with other api, some of the macros are even now used for hash tables in memory, just that the lock/unlock of the slot is done in the implementation code, not in the core code."}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1535#issuecomment-391630806"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647",
"title": "Re: [kamailio/kamailio] str_hash: Option to allocate hash in shm (#1535)",
"sections": [
{
"text": "",
"activityTitle": "**Daniel-Constantin Mierla**",
"activityImage": "https://avatars3.githubusercontent.com/u/184809?s=160\u0026v=4",
"activitySubtitle": "@miconda",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1535,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"pullRequestId\": 1535\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1535#issuecomment-391630806"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 336548118\n}"
}
],
"themeColor": "26292E"
}</script>