Questions tagged [mach]

Mach is the name of the foundational component of the XNU kernel, common to macOS, iOS, tvOS and watchOS. Originally developed by CMU, it was adopted by NeXTSTEP, and integrated into macOS (formally known as Mac OS X) when the former merged with Apple. Though largely undocumented, Mach APIs make up the core of XNU's IPC, scheduling and memory management, supplementing the more widely known POSIX APIs offered in Darwin.

159 questions
33
votes
1 answer

Meaning of a Common String In Executables?

There appear to be some similar-looking long alphanumeric strings that commonly occur in Mach-O 64 bit executables and ELF 64-bit LSB executables among other symbols that are not alphanumeric: cat /bin/bash | grep -c "AWAVAUATSH" has 181 results,…
seewalker
  • 1,123
  • 10
  • 18
19
votes
2 answers

Why does host_statistics64() return inconsistent results?

Why does host_statistics64() in OS X 10.6.8 (I don't know if other versions have this problem) return counts for free, active, inactive, and wired memory that don't add up to the total amount of ram? And why is it missing an inconsistent number of…
Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
16
votes
7 answers

Swift pointer problems with MACH_TASK_BASIC_INFO

I am trying to convert an ObjC stackoverflow answer to Swift and failing. It looks like I am passing a UnsafeMutablePointer when I should be passing an inout mach_msg_type_number_t and I can't seem to work out my problem.…
tobygriffin
  • 5,339
  • 4
  • 36
  • 61
11
votes
1 answer

What is the difference b/w Hurd and Minix?

Knowing both are micro-kernels, what is the difference b/w Mach (on which Hurd is based on) and Minix. Are there any architectural differences? A little light over "what is L4" would be very helpful. I cannot find any documents covering this.
vanangamudi
  • 673
  • 1
  • 8
  • 21
10
votes
3 answers

Best way to communicate from KEXT to Daemon and block until result is returned from Daemon

In KEXT, I am listening for file close via vnode or file scope listener. For certain (very few) files, I need to send file path to my system daemon which does some processing (this has to happen in daemon) and returns the result back to KEXT. The…
RHK
  • 131
  • 1
  • 4
9
votes
1 answer

core audio user-space plug-in driver - sandbox preventing data interaction from another process

I'm working on a coreaudio user-space hal plugin based on the example developer.apple.com/library/mac/samplecode/AudioDriverExamples/Introduction/Intro.html In the plug-in implementation, I plan to obtain audio data from another process i.e.…
Allen
  • 133
  • 1
  • 6
9
votes
3 answers

Sharing Mach ports with child processes

I am doing a comparison of different IPC mechanisms available on Mac OS X (pipes, sockets, System V IPC, etc.), and I would like to see how Mach ports compare to the higher-level alternatives. However, I've run into a very basic issue: getting send…
zneak
  • 134,922
  • 42
  • 253
  • 328
8
votes
1 answer

What is the significance of a macOS Mach-O dylib LC_ID_DYLIB name, or install_name?

I'm working on developing a macOS dylib framework, developed outside of Xcode, and I'm trying to understand the significance of the install_name option. For example, I can set the LC_ID_DYLIB section name to something more-like what you would find…
Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171
8
votes
1 answer

Mach exception in iPhone

I sometimes get following exception: [Mach] exception: 0x%x, count: %d, code: 0x%llx 0x%llx [Mach] Skipping registered port - it is invalid [Mach] Skipping registered port - mask does not match signal %d, info %p, uapVoid %p I do not have any idea…
Udit Agarwal
  • 868
  • 9
  • 22
8
votes
2 answers

Delphi - Obtain Full Stack Trace on OSX

I have an application which can log a stacktrace, which can be later used for debugging. On Windows, I've gotten by using the excellent JCLDebug unit provided by the JEDI project. Now that my application is running on OSX, I've hit a bit of a hitch…
AudioGL
  • 494
  • 4
  • 18
8
votes
2 answers

Total RAM in iPhone

I want to know the Total RAM available in my iPhone. For this I've used the following code. Note: Please do not interpret the question as to retrieve RAM statistics such as Wired, Inactive, Active and Free. mach_port_t host_port; …
Sahil Khanna
  • 4,262
  • 8
  • 47
  • 72
7
votes
3 answers

Which PID listens on a given mach port

My application receives mach IPC messages and return answers for the callers. I have mach caller port(msgh_remote_port) and I want to know PID of the caller. Can I find on OSX by the mach port a PID which listen for specific mach port?
user1119324
  • 151
  • 1
  • 3
7
votes
2 answers

clock_get_time/mach_absolute_time stops updating when device goes to sleep on iOS 7

My application uses mach_absolute_time to calculate the ticks since the last touch event and logs the user out if it surpasses an idle time limit of 10 minutes. This all works fine on iOS 6, but I noticed that it was not behaving correctly on iOS 7.…
Jay
  • 332
  • 1
  • 3
  • 10
7
votes
2 answers

How to get WiFi encryption mode on iOS/iPhone/iPad?

How to get Wi-Fi encryption mode in iOS without private libraries?
isox
  • 539
  • 5
  • 9
6
votes
2 answers

Porting a kernel to a different architecture?

I want to port the xnu kernel to the ARM architecture, with the ultimate goal of being able to run a full kernel inside Qemu. While I do realise that this is a very difficult task, I still want to have a go at it. As far as I know, you're meant to…
Kristina
  • 15,859
  • 29
  • 111
  • 181
1
2 3
10 11