We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi, n e bod know how i can refrag the data in memory?
thx
ow btw, i have the 51 compiler.
Y wd it mtr? Thrs no spd mprvmt wth dfrgd mmry.
Jn
Microsoft have spent years developing and perfecting some software that re-fragments data on your drives.
It's called Windows.
You might want to try contacting them to see if they would let you have the technical specifications.
And I thought that the company that's most involved in the fragging business was ID software. Silly me.
yes, but the OP's motivation is probably memory fragmentation due to excessive usage of constructs such as 'malloc', hence wasted memory. OP: you can prevent this all together if you use static data instead. I'm curious: How do you know you suffer from this problem?
hi gain,
i have big blok n want lots v small 1s
ne bod hav code, must be v good
look, if you need something, you must make clear what it is. I don't understand you. I doubt whether anybody here does!
hi again,
i have a big block of memory but it is to big to send so i have to send lots of small ones.
someone told me to refragment the big memory into lots of small ones but i do not know how.
does any bode have any code to do it?
ell me know how to do it
perceived_iq = 100 * (num_words - num_sms_words) / num_words + 10 * have_capital_at_start_of_sentences + 17 * sentence_terminations - 23 * more_than_tripple_terminated_sentences - 19 * digits_in_words - 2 * lower_case_I;
Might give something like: perceived_iq = 100 * (42-14 / 42) + 0 + 0 - 0 - 19 - 2 = 46
The probability of receiving a good answer is of course affected by the perceived intelligence of the poster.
You don't need to "refragment" a block of memory, just to send the contents in smaller parts.
Just set a pointer to the start of the big block. Process n bytes. Step pointer forward n bytes. Process n bytes. Step pointer forward n bytes. Repeat until done. Note that the last processed block may have less than n bytes if your big memory block isn't an even multiple of the transfer size.
Only one thing to notice: If your program is allowed to change the contents of the large block during the transfer, then you will not be able to send a "snapshot" contents of the large block. On the other hand - the only possible way to send a snapshot is to forbid updates to the large block while the transfer is active, having enough memory to duplicate the block before you start the transfer or keeping a "change list" and dynamically patch outgoing messages based on previous contents stored in the change list.
Per, This expression looks suspiciously like the green bank equation
en.wikipedia.org/.../Drake_equation
:-)
master per,
im not in menser but im not steupid!!!
thx for yr help.
what a refreshing change! We now have TWO masters on the forum: the newly crowned master Per and the one and only, the blessing from the heavens, the protector of efficient code and the sardine hunter - sir Erac !
I didn't talk about stupid. I wrote "perceived IQ". Not your intelligence, but what other people _think_ about you.
You might be a genious, but whenever you use SMS language on a forum for grown-up people, the readers will _assume_ that you are either very young or not too bright.
If it is ok with you that people _assume_ that you are not so bright, then all is well.
But if you are expecting intelligent people to give you intelligent answers, then it helps if people think that you are intelligent too.
In the end, it very much helps _you_, if you spend a bit extra time thinking about what you write, and how you write it. Thirty seconds saved by skipping characters may cost you days or weeks of lost time because the person who had the answer decided to ignore you.
my mum thinx im very cleva ;)
That is ok, if it his her you ask when you need help with programming problems ;)