Hello John! I hope you are doing great, I haven't forgotten you! I was able to understand and run the code and I try to convert it to use "clone3".
Furthermore, I have asked for help because I...
Type: Posts; User: rempas
Hello John! I hope you are doing great, I haven't forgotten you! I was able to understand and run the code and I try to convert it to use "clone3".
Furthermore, I have asked for help because I...
Nope, never mind! The provided code actually work. I probably made a mistake and tried to use CLONE_VM, and It wasn't working, so I messed that up. I am a BIG idiot as it has proven again and again,...
Oh, sorry! The code is posted in the StackOverflow page I linked. Here it is: Re: clone3() example code — Linux API
That's what I'm saying. It shouldn't require a stack. Also I tried the original...
Now that you say it. I tried to think about it in my head, and you are actually right! I was thinking that since they share their memory, they would also share their stack, but now I thought that...
Thank you! Yeah, I messed the order of the last two arguments right here, and I have fixed it now. I was also reading the man pages in a range of days, so I had forgotten the previous text at the...
I have posted that question in StackOverflow as the C programming servers were down, but now they are up, I'm posting there in case someone has not seen it and is interested:
process - Linux:...
Thanks for reading the post (did you read it all tho because that's crucial?) and replaying Tim and with all due respect
but if that's what you understood from my post, it seems that you need more...
Sorry! I thought it was obvious but it's seems that I'm young, inexperienced and naive. TCC refers to the Tiny C Compiler.
As for the benchmarks, I have tried a small fibonacci series program and...
From what I know, TCC doesn't do any optimizations (or does it?), however,
after running some simple, small algorithms, it seems that TCC has the same
runtime performance with GCC and Clang. From...
I'm learning how the OS manages memory so I can hopefully understand. The code for errno is "22" which is invalid argument so you are right. This will mess up my library in the end, lol!
Once again,...
I don't know if this is the right place to ask this (I suppose some people can consider this lower level and not strictly related to C or C++). I have allocated a memory block directly with "mmap"...
Thanks a lot for your thoughts and info Sir! Like I said to a previous comment, I need to get more discipline (I'm young so this may play a role) so reading and learning is surely in my TODO list.
I...
Yeah, I can truly see why been a moderator and trying to be 100% right is super hard. I don't really mind that, what I do mind is people trying to discourage
other people and make them fell bad and...
Don't bother brother! 99% he talks about me and I cannot understand why. The only way I would justify this behavior is I was hostile and rude
against him or anyone else here but I was nothing but...
I really do get hostile vibes from your replies and I don't understand why. It would really be nice if you wanted to address what
made you feel this way so we can fix it. Also, I'm really grateful...
I'm sorry but memory optimizations are consider "advanced stuff" to me compared to a lot of other "cool" things and small optimizations. It may be the opposite for you, it's fine.
Also, why am I...
HOLY!!!! That's truly advanced stuff! Thank you for the info!
WHAT DO YOU MEAN... no no, I'm just kidding, XD!
But seriously, I can confidently say that I have made a HUGE progress not only in theory but in practice too (and my mental health has drastically...
Thank you! Yeah, sorry for not making it clear. I don't care about "printf", I just used it to make the example. Of course the "numbers[i]" and
"*nubers++" is what I care for. In the end, I get your...
Tons of things that I have to learn! Thank you for making my life easier my friend!
So, we're having the following array:
int numbers[5] = { 10, 20, 30, 40, 50 };
int len = 5;
We can loop through them using two ways (or are there any more I'm not aware of?).
Again, thank you for the info! And btw, the only way I would prefer to not optimize is if I wanted to check the machine instructions to learn.
Yeah, that's exactly the behavior I noticed and I'm personally against that. And well, I wouldn't mind it if I had a way to force this behavior. But it seems that
even when I type something like...
@flp1969 @john.c
Oh, sorry guys! And thank you for helping me start out. I'm already starting to feel more confident.
I also use an assembler (can decide between "nasm" and "gas" yet as they seem...
I didn't used assembly. Just created an ELF file (manually wrote the bytes) and then used the
OS's loader (executing it with './' from the shell) to load and execute it. The original code is from
a...