Posts

Showing posts from August, 2024

Wife Laptop Asus X409UA specs

Asus Vivobook X409UA Color: Transparent Silver Windows 10 Home Intel® Core™ i3-7020U Processor 2.3 GHz (3M Cache, up to 2.3 GHz, 2 cores) (Takes DDR4-2133, LPDDR3-1866, DDR3L-1600 ) Intel® HD Graphics 520 14.0-inch, FHD (1920 x 1080) 16:9 aspect ratio, LED Backlit, 60Hz refresh rate, 220nits, 45% NTSC color gamut, Anti-glare display, Non-touch screen 4GB DDR4 on board 1TB SATA 5400RPM 2.5" HDD 1x DDR4 SO-DIMM slot 1x M.2 2280 PCIe 3.0x2 1x STD 2.5" SATA HDD 1x USB 3.2 Gen 1 Type-A 1x USB 3.2 Gen 1 Type-C 2x USB 2.0 Type-A 1x HDMI 1.4 1x 3.5mm Combo Audio Jack Micro SD card reader Backlit Chiclet Keyboard, 1.4mm Key-travel, Touchpad VGA camera SonicMaster Built-in speaker Built-in microphone with Cortana support Wi-Fi 5(802.11ac) (Dual band) 1*1 + Bluetooth® 5.1 Wireless Card 32WHrs, 2S1P, 2-cell Li-ion ΓΈ4.0, 45W AC Adapter, Output: 19V DC, 2.37A, 45W, Input: 100~240V AC 50/60Hz universal 1.60 kg (3.53 lbs) 32.50 x 21.60 x 2.31 ~

Playing with C++ "Polymorphic Memory Resources"

Recently I was looking into heap-less programming topic using C++. Turns out the std::pmr namespace provides a bunch of useful stuff to create memory pools wherever you want - globally, on stack etc, and then you can avoid a bunch of new-delete calls. Below is some code samples I found in a paper at  https://www.rkaiser.de/wp-content/uploads/2021/03/embo2021-pmr-STL-for-Embedded-Applications-en.pdf I added some notes at the end about what I observed in my usage - especially the problem of bad-allocations which was different than expected behavior. But it could be the compiler too. Anyway I did found a workaround to safely handle that too. Cheers!! // --------------------------------------------- #include <iostream> #include <vector> #include <iomanip> #include <memory_resource> #include <array> int new_counter = 0; int delete_counter = 0; size_t allocated_mem = 0; void showmemory(unsigned char* buffer, std::size_t buffer_size, const char* headline); void

Car audio upgrades

I had to search for car related posts and I found that I have never written anything about the various gadgets in my car. There's just one post about dashcam when I bought one - DDPAI a2. It has worked fine mostly. Although it did crap out and I got it repaired for 1000 Rs from their service center 25km away. So what other gadgets I have? Well, I got a Sony A416BT 1-DIN car-audio system and 4 Pioneer TS-R1651D speakers fit-in at the time of delivery itself. I added a Mi car charger too - it's fast charger port has since nuked itself. But the other one works fine so I have not replaced it. All this was enough for last 4-years. Remember this was a budget purchase and the car loan is still ongoing. But this year I felt I should upgrade some things. The most visible upgrade would have been an android head-unit and maybe better speakers. Then I realized my biggest problem is road noise on highway. Of course the original tires were getting worn and they were adding to it. So few mont