ObjFW  All files named "src/runtime/autorelease.m"

History for src/runtime/autorelease.m

2024-04-03
02:16
Change license to LGPLv3 only file: [ba740929be] check-in: [7413a728a7] user: js, branch: trunk, size: 3840 [annotate] [blame] [check-ins using] [diff]
2024-01-02
17:17
Update copyright file: [bcf56c003e] check-in: [26ddd2e4e4] user: js, branch: trunk, size: 3632 [annotate] [blame] [check-ins using] [diff]
2023-01-06
09:04
Update copyright file: [2df304f6dc] check-in: [8939cbdb52] user: js, branch: trunk, size: 3632 [annotate] [blame] [check-ins using] [diff]
2022-09-19
19:10
Fix missing void in function declarations file: [a652114a4e] check-in: [41c2b305ce] user: js, branch: trunk, size: 3632 [annotate] [blame] [check-ins using] [diff]
2022-02-12
07:46
Update copyright file: [44274c4d6f] check-in: [1a86b8175b] user: js, branch: trunk, size: 3628 [annotate] [blame] [check-ins using] [diff]
2021-08-07
23:31
Make autorelease.m work with old Apple runtimes file: [4890f3bc38] check-in: [f04894828e] user: js, branch: trunk, size: 3628 [annotate] [blame] [check-ins using] [diff]
2021-05-02
14:28
Don't use OFEnsure() in runtime file: [c90ec8958a] check-in: [0c7760bd05] user: js, branch: trunk, size: 3491 [annotate] [blame] [check-ins using] [diff]
2021-04-18
20:51
Rename everything in several smaller files file: [2b09f19f70] check-in: [35de667566] user: js, branch: new-naming-convention, size: 3295 [annotate] [blame] [check-ins using] [diff]
15:55
Rename all functions in macros.h file: [6bcc230085] check-in: [7392685ffc] user: js, branch: new-naming-convention, size: 3293 [annotate] [blame] [check-ins using] [diff]
2021-04-17
15:45
of_tlskey_t -> OFTLSKey file: [ae6a8b4a1b] check-in: [cc3a4a7b43] user: js, branch: new-naming-convention, size: 3303 [annotate] [blame] [check-ins using] [diff]
2021-01-02
22:04
Update copyright file: [cddc441815] check-in: [374e1a1bfa] user: js, branch: trunk, size: 3340 [annotate] [blame] [check-ins using] [diff]
2020-12-20
21:26
Return error instead of using errno for threading

errno is problematic for Amiga libraries and is also not thread-safe on
some systems, even though it should. file: [0e5c7aa48b] check-in: [5b37fbeb82] user: js, branch: trunk, size: 3429 [annotate] [blame] [check-ins using] [diff]

2020-09-27
23:27
Fix missing include file: [e5ceb906d0] check-in: [bb18681460] user: js, branch: trunk, size: 3384 [annotate] [blame] [check-ins using] [diff]
01:56
Fix compiling for old Apple runtime file: [81f19ca445] check-in: [877616edaf] user: js, branch: trunk, size: 3365 [annotate] [blame] [check-ins using] [diff]
2020-01-24
03:03
runtime: Correctly handle AR pool push during pop

Getting a pointer and increasing it until we reach the top pointer does
not work: Releasing an object can temporarily create new autorelease
pools, which can trigger resizing of "objects" using realloc, which can
move it to a different address, which will then lead to continuing to
iterate on a now invalid pointer.

This is now solved by using an index into "objects" instead. Since we're
now indexing for the pop, let's use indexes everywhere, as they're more
readable anyway.

While debugging this, I noticed that the last pool is popped quite
frequently, only for a new pool to be pushed immediately again. This
resulted in a free followed by a malloc every time. Instead, keep the
pool, but let OFThread explicitly say when to free everything. file: [99568ccb12] check-in: [e7f4f80e23] user: js, branch: trunk, size: 3222 [annotate] [blame] [check-ins using] [diff]

2020-01-02
22:16
Added: Move autorelease pools to runtime file: [6a15e61b81] check-in: [f2fe8f96d5] user: js, branch: trunk, size: 3192 [annotate] [blame] [check-ins using]
2012-07-18
00:16
Deleted: Always compile autorelease.m if necessary.

It is also required when using the Apple runtime on OS X prior to 10.7. check-in: [85cbeeeb04] user: js, branch: trunk, size: 0

2012-07-17
01:09
Rename ERROR() to OBJC_ERROR().

ERROR seems to be defined on MinGW32 and it's likely that it's also used
on other systems, thus it's better to prefix it with OBJC_. file: [c7e0c15de1] check-in: [345eb93240] user: js, branch: trunk, size: 3125 [annotate] [blame] [check-ins using] [diff]

2012-07-16
12:19
Free memory when the last pool has been drained. file: [43d183da0e] check-in: [5abd9baa33] user: js, branch: trunk, size: 3080 [annotate] [blame] [check-ins using] [diff]
2012-07-15
00:38
Fix missing initialization of size. file: [0fa16a5970] check-in: [335ba77462] user: js, branch: trunk, size: 2970 [annotate] [blame] [check-ins using] [diff]
2012-07-14
22:21
Fall back to of_tlskey if __thread is unavailable. file: [790a0b73c2] check-in: [95b1b31aa5] user: js, branch: trunk, size: 2948 [annotate] [blame] [check-ins using] [diff]
21:02
Fix forgotten __thread. file: [b91ab77a61] check-in: [eade7d765c] user: js, branch: trunk, size: 1604 [annotate] [blame] [check-ins using] [diff]
20:00
Added: New autorelease pools.

This uses the runtime's autorelease pools and implements autorelease
pools in the ObjFW runtime. It therefore uses ObjFW's autorelease pools
when using the ObjFW runtime and Apple's autorelease pools when using
the Apple runtime.

These new pools should be ARC-compatible now and finally, it should be
possible to mix OFAutoreleasePools and NSAutoreleasePools again, even
@autoreleasepool is allowed in the mix now. This also means the old
bridge to NSAutoreleasePool should not be required anymore, as both use
the runtime's autorelease pools now.

As a bonus, it's significantly faster to use the ObjFW runtime with
ObjFW's autorelease pools than to use Apple's runtime with Apple's
autorelease pools, as a quick benchmark using OFXMLParser on large files
showed. (Note: This is not only due to the different autorelease pools,
but also due to the fact that even with the same autorelease pools it is
faster using the ObjFW runtime, as can be seen in versions prior to this
commit.) file: [aef7e3462c] check-in: [f5927f8a84] user: js, branch: trunk, size: 1595 [annotate] [blame] [check-ins using]