)]}'
{
  "commit": "e72a9487d762675b865ee57fb4333ad0fe9f07c9",
  "tree": "34f7404c6cff4ec1971b06ba8d54c7c00e04a524",
  "parents": [
    "91f34d4fe2fe0ffd393d0d915a75469fd60489a1"
  ],
  "author": {
    "name": "Hugo Lefeuvre",
    "email": "hugo.lefeuvre@scisemi.com",
    "time": "Tue Jun 11 11:41:00 2024 +0200"
  },
  "committer": {
    "name": "David Chisnall",
    "email": "davidchisnall@users.noreply.github.com",
    "time": "Wed Jun 12 10:07:49 2024 +0100"
  },
  "message": "Revisit the blocking behavior of `malloc` and `calloc`.\n\nWe have recently changed the blocking behavior of `malloc` and `calloc`\nin 3ff0dda87b07973e588cd7efa522c7de6e7fe2ca from a fully blocking\nbehavior to an entirely non-blocking behavior.\n\nThis change, although it addressed some problems, created new ones: we\nnow have situations where malloc is returning `nullptr` because the\nquarantine is holding back memory which could be used for the\nallocation. In such cases, the allocation could be satistified with a\nsmall wait. This creates issues in the network stack.\n\nThis indicates that neither fully blocking nor fully non-blocking is the\nright approach here.\n\nThis commit proposes to immediately return `nullptr` if the heap or the\nquota is full (do not block), but block for a short timeout if the\nquarantine is holding back memory which could be used for the\nallocation. The short timeout can be configured through a macro, here\nset at 30 ticks which seems to be a reasonable time for the revoker to\nprocess the quarantine.\n\nModify `MVM_CONTEXTUAL_MALLOC` to exhibit a similar behavior.\n\nSigned-off-by: Hugo Lefeuvre \u003chugo.lefeuvre@scisemi.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1b2e4b1ce218bbbec5761acb2ecf5097cc4f9972",
      "old_mode": 33188,
      "old_path": "sdk/include/microvium/microvium_port.h",
      "new_id": "c18188aea66420cc2f00275e66bbf091362299a1",
      "new_mode": 33188,
      "new_path": "sdk/include/microvium/microvium_port.h"
    },
    {
      "type": "modify",
      "old_id": "de007dd2214595ffef17f161f57d3671f7287364",
      "old_mode": 33188,
      "old_path": "sdk/include/stdlib.h",
      "new_id": "6955d233e30824a6bd199293d00a284fd43fb025",
      "new_mode": 33188,
      "new_path": "sdk/include/stdlib.h"
    }
  ]
}
