[racket-dev] Memory consumption of Racket
hi Kevin:
I've successfully enabled places with a few in-code fix to be compiler
happy, mostly are implement atomic operations using OSAtomicXXX provided by
Apple and emit arm instruction instead of thumb. It just run without low
memory crashes (at least per my recent runs), although still getting a level
1 memory warning which is common for most of complicated softwares in iOS I
think. But I would be rather appreciated if you have something else which I
can look into by myself to further reduce memory consumption. Thanks!
Cheers
Nevo
On 23 April 2011 21:24, Nevo <sakur.deagod at gmail.com> wrote:
> hi Kevin:
> Thanks for your help here. I'm trying to enable "place" first then I
> think I can apply your patch. Is there still a way to reduce unused memory
> as in your patch, but without the need of "place"?
>
> Nevo
>
>
> On 23 April 2011 21:16, Kevin Tew <tewk at cs.utah.edu> wrote:
>
>> Here is another patch you can try to reduce caching of unused memory.
>>
>> diff --git a/src/racket/gc2/alloc_cache.c b/src/racket/gc2/alloc_cache.c
>> index 44895af..d1f1c03 100644
>> --- a/src/racket/gc2/alloc_cache.c
>> +++ b/src/racket/gc2/alloc_cache.c
>> @@ -10,7 +10,7 @@
>> */
>>
>> /* Controls how often freed pages are actually returned to OS: */
>> -#define BLOCKFREE_UNMAP_AGE 3
>> +#define BLOCKFREE_UNMAP_AGE 0
>>
>> /* Controls size of the cache */
>> #define BLOCKFREE_CACHE_SIZE 3000
>>
>>
>>
>> On 04/23/2011 05:14 AM, Jens Axel Søgaard wrote:
>>
>>> 2011/4/22 Nevo<sakur.deagod at gmail.com>:
>>>
>>>> hi
>>>> My attempt on porting Racket interpreter to iOS has been for a while
>>>> and
>>>> I've been able to run interpreter on both iOS device as well iOS
>>>> simulator.
>>>>
>>> Great news.
>>>
>>> Right now, it runs perfectly on iOS simulator, but lack of satisfaction
>>>> on
>>>> device. The reason is for those devices like iPad/iPhone or Android, the
>>>> memory for standalone application is always constrained, and even a
>>>> single
>>>> "hello world" evaluation would easily put the whole app runtime to
>>>> death,
>>>> per my test.
>>>>
>>> I am curious which iPhone and which iPad?
>>>
>>> For the non-iPad owners here are a few (unofficial) specs, so you
>>> have a rough idea of how much memory the iDevices have:
>>>
>>> Internal RAM for:
>>> iPad 2 512MB
>>> iPad 1 256MB
>>>
>>> iPhone 4 512MB
>>> iPhone 3GS 256MB
>>> iPhone 3G 128MB
>>> iPhone 128MB
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110426/0de36f57/attachment-0001.html>