Keeping RAM usage small for iOS Notification Service Extension

Open
#1,229 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, ios

Research direction

Start with the hxcpp garbage collector and reproduce the 24MB limit in an iOS Notification Service Extension using the Xcode memory profiler. The issue names no source file or test, and completion criteria are not defined beyond reducing GC-held memory or providing a way to configure collection for the constrained environment.

Written by the indexing model from the issue text.

Description

For an iOS NSE the total memory limit is 24MB. Trying to use some of my Haxe code blows this limit almost immediately, with 15MB being held by the hxcpp GC in 15 1MB allocations, according to the Xcode memory profiler.

I really doubt the code in question actually needs 24MB of memory, but probably this is the result of a lot of garbage being generated and not collected since the GC assumes it doesn't need to collect yet.

Is there any way to make the GC more aggressive, or tell it what the max memory in the environment is?

Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.