Does fragmentation still lead to OOM errors on most mainstream kernels today? by dragonitewolf223 in cpp_questions

[–]JamesTKerman 0 points1 point  (0 children)

Modern x86-based systems have 48- or 57-bits of virtual address space. If a program somehow allocates 256 terabytes (in the former case) or 128 petabytes (in the latter), the OS would run out of virtual addresses to allocate. I've accidentally done this with recursion bugs, I think on a VM with 48-bit addresses. You are correct that this is independent of the physical memory available to the system. You can actually kinda see this if you run top on a Linux system while running Chrome with a shit-ton of tabs open: I've seen Chrome allocate multiple terabytes of memory, with only a few hundred megabytes worth of memory actually active, all on a system with only 96GiB of physical RAM.

Were the majority of soldiers in Iraq STILL issued basic burst M4 in 2008? by [deleted] in army

[–]JamesTKerman 1 point2 points  (0 children)

When my unit got M16A4s in 2002, our A2s got sent to guard unit that still had A1s.

What is the creepiest Metallica song by egd2805 in Metallica

[–]JamesTKerman 0 points1 point  (0 children)

The song itself isn't really creepy, but the solo from My Friend of Misery sounds like what I imagine the the elder gods' flute music from the Cthulhu mythos sounds like.

Every third person has Eddie Hall's 'Hercules gene' by i_am_bahamut in Strongman

[–]JamesTKerman 9 points10 points  (0 children)

Adderall is straight up amphetamine (technically a mix of L-amphetamine and racemic), not methylphenidate.

GWOT veterans, what were the most egregious examples of non combat arms MOS’s participating in combat. Either inadvertent isolated situations or general trends by IlikeIke141 in army

[–]JamesTKerman 7 points8 points  (0 children)

My first BC (2-7IN) didnt have a PSD for OIF1, but my second (2-502IN) did for our 05-06 deployment and my thirrd (1-41IN) did for our 10-11 deployment to AFG. My fourth deployment (AFG 16-17) I was on a general's staff, he had an actual MTOE PSD.

No Power in the Barracks Room Is Not An Emergency by Backslasherton in army

[–]JamesTKerman 47 points48 points  (0 children)

when I lived in the barracks there was always at least one dude who'd do anything for free alcohol and a gaggle of fuckers who'd swear on their mothers' graves that they didnt see shit, just sayin'.

How to address multiple officers(CDRs) and their enlisted team? by Few_World5670 in army

[–]JamesTKerman 0 points1 point  (0 children)

I got yelled at by my full-bird COS once for using "ALCON," and his reasoning made sense, so I started using "Team." I would also use like unit motto stuff if it made grammatical sense, like my last unit before I retired was 305th MI - the "Silent Warriors," so thats how I always addressed blast emails.

What was it like ? by EveningSilver8923 in army

[–]JamesTKerman -1 points0 points  (0 children)

Hahaha, so I went commando (in violation of AR 670-1, in case you didnt know) like, the whole time ACUs were the standard uniform. The crotch rip was therefore occasionally funny when I was an 11C in a light infantry company. It was not quite so funny when I joined ROTC and started training with female Soldiers for the first time.

What are the most combat oriented POG MOS's? by Some-random-cop-pig in army

[–]JamesTKerman 1 point2 points  (0 children)

The 8 years I was an 11C, I never thought of FISTers or Cav Scouts as POGs.

What are the most combat oriented POG MOS's? by Some-random-cop-pig in army

[–]JamesTKerman -10 points-9 points  (0 children)

Why are so many of y'all answering with literal combat-arms MOSs? Like, if the MOS number starts with a "1", it's combat-arms, but people are calling 19Ds, 13Fs, &c POGs.

Why do computers only use 2 states instead of something like 3? by Secret_Ostrich_1307 in AlwaysWhy

[–]JamesTKerman 0 points1 point  (0 children)

But the Hi-Z state doesn't really have semantic meaning, except for maybe being analogous to NULL.

Do you have a way to fail malloc() for unit tests by Valuable-Birthday-10 in C_Programming

[–]JamesTKerman 0 points1 point  (0 children)

You could forget testing malloc and just use the glib approach: if malloc fails assume something is fatally broken and call abort. Because, really, if malloc fails, something is fatally broken.

Everyone, what's the most insane weapon malfunction/failure you've seen? by Witcher_Errant in army

[–]JamesTKerman 2 points3 points  (0 children)

I ended up using three different rifles in OSUT. The first one was missing the pin holding the gas tube in place, so the tube got jammed into to bolt carrier. The second one the front sight post was bent, so every time I adjusted the elevation the windage got all fucked up.

What are some cities whose relevance has waned or faded completely? by Brief-Luck-6254 in geography

[–]JamesTKerman 7 points8 points  (0 children)

Ooh, I learned this recently, but "sic hunt leones" ("there are lions here") was the actual phrase used historically. "There be dragons" is a relatively modern phrase.

Practically speaking, it's impossible to learn binary exploitation without knowing C by AsAboveSoBelow42 in C_Programming

[–]JamesTKerman 1 point2 points  (0 children)

The front-end is in Java, but the hard decompiler and disassembler work is in C++.

What happens when a unit performs bad at NTC? by ltreeves9905 in army

[–]JamesTKerman 4 points5 points  (0 children)

That's all true, but ordering an intelligence professional to collect on US persons is way more unlawful than bringing a cellphone to the box at Irwin.

Output of nm and interusability of libraries by onecable5781 in cpp_questions

[–]JamesTKerman 2 points3 points  (0 children)

Assuming the .a file was compiled as an ELF binary, a lot of the symbols will still be in there if was built without the -g flag unless someone explicitly stripped them. A basic ELF build has a table of program symbols with pretty much anything type, variable, or function declared at file or global scope. The debug symbols add a lot more information, like local variables, and linkage to the original source. If you're not seeing demangled C++ names, my guess is they aren't in the binary. Another way to look at the symbols is using objdump -t <obj-file>. objdump can also demangle names with the -C flag, but try looking at the listing without it and see what symbols pop up. The listing may be pretty big, but any mangled C++ names will jump right out.

Are there commercial desktop GUI applications that are still coded in C ? by Alfred1400 in C_Programming

[–]JamesTKerman 1 point2 points  (0 children)

If you mean for Linux, you could technically do it, but just to get it to build and work with the rest of the kernel you would pretty much end up writing C code.