Jump to content

freghar

Members
  • Posts

    461
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by freghar

  1. you need 64bit if you plan to use 4gb or more memory

    To be more exact - most 32bit systems can use up to 64GB of RAM, they just can't address it directly.

    More accurately, when you need more than 3GB VAS (for Windows Server 32bit systems with /3GB) or 2GB VAS (for Windows Client 32bit systems). Of course, 64bit Windows Server/Client provide 4GB VAS to each process.

    Even more accurately, 32bit VAS is always 2^32. No more, no less. However a 32bit app can't use entire 4GB, because it needs already-mapped (loaded) system/user libraries, it needs addresses for various system calls (like mmap()) and so on. That gives 3GB of RAM on newer (AFAIK post-2.6.13) Linux systems for in-process user data (ie. 3GB can be malloc()'ed).. Windows have 2GB by default, but it can be changed to 3GB via some /3GB switch in boot.ini or so, it never worked for me.

    The situations is the same on 64bit system using 32bit userspace application. The app stil needs to access all those shared/system calls, it needs _some_ way to talk to the kernel and since the app itself uses 32bit pointers, it can't use addresses larger than 2^32-1 for it. This is not true for 64bit userspace applications, obviously.

  2. Please forgive me for being a bit offtopic.

    master - No modifications, direct replica of mangos/master

    I don't get it. I'd get it if some git-newbie had used it this way, but I think you're smart enough to have some logic explanation behind it. Because having a replica of mangos/master just doesn't make sense to me, but perhaps there are graphic tools I don't use (tortoisegit, ...) that need to have origin/master reflect some foreign branch, so please enlighten me, I'd really like to know. Thanks.

  3. No DasBlub is creating a new class thus he's pointing to that class. And why is it recommended to not use new ?

    Because it makes a dynamic memory allocation. Doing it like

    mangos *pMangos;
    mangos f;
    pMangos = &f;
    

    not only removes the need to call "delete", but it creates all the variables directly on function's stack, saving a few kernel mmap() calls.

    On the other hand, it's total nonsense to create a pointer to "f" in the same scope (no, it won't speed up anything, it'll even slow things down a bit).

    Learning pointers in C++ code might be a lot harder, i'd suggest learning those in C99 instead. No C++ complexity involved + you can easily disassemble the binary and see how it works.

  4. @floydstime

    Are you attempting to use the same computer the server is on to go through *.thruhere.net? Because if so, it won't work.

    If you have a dydns, you only need to have that in your realmlist table. All your LAN computers should then have in their hosts file: "*.thruhere.net 192.168.11.8" or if it's the servers computer "*.thruhere.net 127.0.0.1". (Obviously without the quotation marks)

    Also, as freghar says, put *.thruhere.net in the realmlist table.

    Hope this helps, Blader.

    That's why I pointed out the "NATs". The traffic can actually go through router (making *.thruhere.net work from everywhere) - most small embedded routers do that by default. It's not a clean solution, though.

  5. Side note: While "googling" for some more info on this issue with GCC and the ICC reference quoted by you, I noticed that Intel finally offers its compilers and some libraries as freeware for Linux!

    Sure, mangos uses intel's TBB library to speedup windows allocations (for example). ICC compiler isn't as cool as it might look like, it negatively (and intentionally - proven) affects non-Intel CPUs.

  6. Notice the difference: http://openpaste.org/en/20497/ (ending NULL doesn't really matter, I've tried to (ACE_Thread_Mutex*)NULL it, but the error obviously remained). The problem probably lies in the "reference".

    Might be related to http://gcc.gnu.org/ml/gcc-help/2006-09/msg00322.html:

    > I wonder if this is a known G++ limitation or issue ? Because the same

    > program got compiled with VC8.

    You were trying to get a reference to a temporary object by just calling

    the constructor of MemAllocator where func expects a MemAllocator&.

    The error message kind of contains this info as it says that it can't

    find func(MemAllocator), note no reference.

    A more intuitive error message would be nicer, I guess. E.g. icc9.1

    tells you:

    testKelvin.cpp(12): error: initial value of reference to non-const must

    be an lvalue

    Map::func((MemAllocator<int>) (MemAllocator<int>()));

    And Comeau (http://www.comeaucomputing.com/tryitout/) says the exact

    same thing (hmm, is icc using the EDG front-end now?)

    Note that even if VC8 decided to compile this code it most likely

    wouldn't work properly. OTOH maybe you meant to pass a const ref anyway?

    edit: btw; The performance gain from map preloading won't be THAT much, .. since most modern OSes use free RAM for block-level (LBA) disk cache. It will be somewhat faster (no additional layers, no extensive in-memory copies, ...), but it won't be really that much.

  7. Could it be whitespace errors? When I opened your last offered patch, copied as plain text from Pastebin, with Notepad++, I turned on "Show Whitespace" and noticed that all the blanks lines used to separate code sections actually had a single space. Lines 21, 28, 48, 65, 69, 71, 84, 90, 92, 95, 105, 108, 113, 119, 129, ... and so on.

    I don't know how GCC handles this, but it will cause whitespace errors for my setup, msysgit with TortoiseMerge and VC++ 9.0 Express SP1.

    That's probably not the issue, I'll take a look at it if Zor has it in his github repo.

    edit: yes, it looks like some namespace issue

  8. I can not seem to get my server to broadcast out of the LAN. I did what it said to do above. forwarded ports and 3306, 3724 and 8085 exceptions on firewall. I used dynaDNS for my dynamic connection. I updated the realmlist wtf and database in myql to.

    My local Lan is 192.168.11.8 I put this in line 1 of realmd realmlist table I can connect on the LAN to this.

    My internet IP is 98.239.***.*** (*masked) I put this on line 2 of realmd realmlist table

    My dynadns address is *.thruhere.net I put this in my realmlist.wtf

    I can connect through 192.168.11.8 but not through *.thruhere.net

    I have comcast and I am hosting behind a router.

    *edited*

    I am getting Login Server Down when I try to login...

    I am using a buffalo whr-g54s

    First check your firewalls and NATs, then check your BindIP (should be 0.0.0.0). Also try putting *.thruhere.net to the realmlist table. It might also be DNS caching delay problem.

  9. then help me with ur way step by step :(

    What about you trying to find something yourself? Seriously, your questions and errors here belong to person with IQ below 50. I've suggested the rc.local way (which would work on OS startup as well), perunio here provided the simpliest working process restarter ever, xeross supplied his python script, so I'd simply choose one way and try my best with it. Google included.

    Simply said - run the small loop (with added sleep delay) in a screen session started by rc.local. That's it. No need for PID lookups, no need for every-minute checks.

  10. Could you explain this more please?

    void function(Object * object)
    {
       object->x = 5;
    }
    

    i think it is something like that?

    class test

    {

    public:

    void function(Object * object)

    {

    }

    };

    int main()

    {

    int x = 9;

    test Test;

    test * pTest = &Test;

    pTest->functie(x)

    }

    If this is correct why you can do this : test * pTest = &test;

    As far as C is concerned, you can't. It'll throw a compilation error about undeclared variable. Simply because "test" is a data type (class), not actual variable (and thus you can't get it's address).

  11. This has been a question of mine for a while now. I want to get into programming, but where to start? I taught myself BASIC when I was 9... A software engineer that I respect who use to work for Google told me to start with C as everything else (Java, C++, C#, Objective-C, etc) bows to it's syntax. Most people seems to say just skip C and dive into C++. Yet another person is telling me to skip C++ and head towards C#/mono. I want to be a wide-spectrum programmer, able to generate code for Windows, Linux, and Mac OS X. (Way off topic here) my eventual goal would be to create an open source software virtual instrument rack patterned after Propellerhead's Reason, since there really isn't any linux/open source equivalent. Thoughts?

    skinlayers

    Go for ASM if you need low level embedded non-portable programming.

    Go for C if you need "somewhat" portable code and want to have control _how_ your program actually does things. C is generally good for system-level programming, I say it's a good compromise between assembly and high-level languages. If you turn off all compiler optimizations, you can write all the functions, variables, structures (almost) exactly the same way they'll appear in the final executable.

    Go for C++ if you need higher-level portable programming and OOP style. Some people say it's "an extension" to the C language, they also say it's "not really a good way to extend C". C++ could indeed have better design and syntax specifications, but anyway - it's the most common language today (imho) and that's what counts. You can use C-like variables and structures in C++ to some degree. With C++ comes great responsibility for code concept, you can do MUCH more things in MUCH more ways than in C, which can result in a total code crazyness - don't forcefully use everything C++ offers just because it compiles fine.

    Go for C# if you .. well, I can't really say. Many people warn about Microsoft's claims on intellectual property in relation to mono. On the other hand - it *might* be a good language for Windows-only apps, I haven't really tested that. Don't expect to get the same portability as with C++.

    Go for Python/Java/Perl/whatever if you want ultra-portable code and true high-level syntax. Many people use Python with PyGTK to make nice GUI apps without having to fight the low level issues. Some guys here might say "naah, those high-levels are WAAAY too slower than C++". Yes, they're right. But the slowdown isn't really noticeable in common applications. It's even less noticeable when it comes to PyGTK/PyQt as the same graphic lib gets used anyway.

  12. you haven't learned it enough yet

    That is exactly the reason why people don't like it. They don't want / have no time to spend on "learning git". I understand that, I really do. Why bother learning windows when I have my good old easy DOS prompt, which has even some advantages over windows. Git isn't perfect as well.

    But - in the end - I don't care. SVN isn't really bad at all, the problem here could be misleading revision number (different from mangos).

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use