fix(keyboard): stabilize Flow startup under memory pressure
Delay competing Rime work, add extension memory telemetry and stress coverage, and refresh the 1.8 release assets and metadata for build 79.
This commit is contained in:
@@ -7,9 +7,30 @@
|
||||
// dyld (usually host coexistence or an oversized Shared+Rime mapping).
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/task_info.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static double OSGKeyboardExtPhysFootprintMB(void) {
|
||||
task_vm_info_data_t info = {0};
|
||||
mach_msg_type_number_t count = TASK_VM_INFO_COUNT;
|
||||
kern_return_t result = task_info(
|
||||
mach_task_self(),
|
||||
TASK_VM_INFO,
|
||||
(task_info_t)&info,
|
||||
&count
|
||||
);
|
||||
if (result != KERN_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
return (double)info.phys_footprint / 1048576.0;
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
static void OSGKeyboardExtBootProbe(void) {
|
||||
NSLog(@"[OSGDiag/boot] dyld.constructor pid=%d", getpid());
|
||||
NSLog(
|
||||
@"[OSGDiag/boot] dyld.constructor pid=%d foot=%.1fMB",
|
||||
getpid(),
|
||||
OSGKeyboardExtPhysFootprintMB()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user