« first day (1654 days earlier)      last day (1190 days later) » 

user7659542
7:12 AM
@Mgetz I m having the following error:
 
user7659542
The absolute segment on the address f000-f06b in the module main overlaps the Amalie segment on the address f000-f06b in the module paramsModule
 
user7659542
The code looks something like this:
 
user7659542
main.s
 
user7659542
params.s
 
user7659542
 
user7659542
Note that params.s does not contain anything related to origins such as ORG O123h or whatever
 
user7659542
* the error message is supposed to be “absolute” segment, not Amalie segment...
 
user7659542
What are your thoughts? How can I find what is causing this error? I read the different technical docs, but didnt encounter anything that made clear to me what lead me to this error. I have also checked the linker command file, but that didn’t seem to contain anything fishy. I think....
 
How to remove the last character that has been passed to std::cout(i.e std::cout<<"hello,world!", remove the last character(!)).
 
8:16 AM
@John depending on the situation, you may be able to kinda, sorta simulate removing it with std::cout << '\b';. But it's far from being guaranteed.
 
I see. It's a bad news indeed.
 
@John Assume you're writing to the terminal, and the user has already seen the output. How do you hope to get them to un-see it?
 
@JerryCoffin As far as I know, the message is flushed to the console when encountering std::endl or invoking flush function. I can guarantee no such operations would be performed.
 
@John ...or when a buffer gets full. Or maybe immediately.
 
@JerryCoffin Yes, I forgot.
 
 
5 hours later…
1:47 PM
I have a function with two parameters. Assume int foo(int x, int y)
x changes on each call but y only changes once per program execution
Is there a good way to implement this? Will the optimizer know to inline it?
 
nwp
I guess you could put it in a global variable to possibly save yourself writing an int, but I don't expect this to ever make a difference.
There is also a chance it becomes slower because the stack is in cache and that global variable might not be.
But guessing performance tends to be a losing game. You'll have to benchmark both versions and take the faster one if you care.
Alternatively you can also decide that losing a nanosecond isn't worth your time fixing.
 
I was thinking it would be a huge hit if an additional variable is need on the function frame each time, but maybe not
 
nwp
Chances are the variables are passed in registers where they happen to be anyways and it doesn't cost time at all.
But you won't know for sure until you test it.
 
2:07 PM
@traducerad check all the different segments you're linking
 
user7659542
2:23 PM
@Mgetz what should i look for or what precisely shall i check?
 
@traducerad look at the segment declarations, see if things are being put in the same segment etc.
remember the linker is critical to what you're doing, so segment declarations need to be perfect
 

« first day (1654 days earlier)      last day (1190 days later) »