Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Issue using times function in Intel MAC
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="sjain" data-source="post: 238693"><p>Hi All,</p><p></p><p>I am getting this strange error on Intel MAC OS whereever i use </p><p>times(NULL) function.</p><p></p><p>I am using the following piece of code:</p><p></p><p>#include <time.h></p><p>int main()</p><p>{</p><p>1 clock_t myTime;</p><p>2 myTime = times(NULL);</p><p>3 return(0);</p><p>}</p><p></p><p>The progarm compiles sucessfully, but on running the application, it throws the following error at line 2:</p><p>Program received signal EXC_BAD_ACCESS, Could not access memory.</p><p>Reason: KERN_PROTECTION_FAILURE at address: 0x00000000</p><p>0x900a3fb2 in times ()</p><p></p><p>Can anybody help me out with this problem. This seems to be Intel MAC specific. I dont face any issue with this piece of code on any other unix based system.</p><p></p><p>Thanks a lot in advance</p></blockquote><p></p>
[QUOTE="sjain, post: 238693"] Hi All, I am getting this strange error on Intel MAC OS whereever i use times(NULL) function. I am using the following piece of code: #include <time.h> int main() { 1 clock_t myTime; 2 myTime = times(NULL); 3 return(0); } The progarm compiles sucessfully, but on running the application, it throws the following error at line 2: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x900a3fb2 in times () Can anybody help me out with this problem. This seems to be Intel MAC specific. I dont face any issue with this piece of code on any other unix based system. Thanks a lot in advance [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Issue using times function in Intel MAC
Top