Memory Management: Address Spaces, Translation, and Allocation

Address Space

Address space: The illusion of infinite memory presented to a program, representing a process’s memory. Virtual memory creates this illusion, extending RAM to the physical drive, allowing larger programs to run by swapping inactive components to disk.

Memory Allocation

Malloc – Allocates memory and returns a pointer to the block without initializing it.

Calloc – Allocates and initializes memory to zero.

Realloc – Resizes previously allocated blocks, trimming or expanding as needed without

Read More

Mastering CSS: Stylesheets, Syntax, and Visual Enhancements

CSS Essentials

Why Use CSS?

  • Greater control over typography and layout
  • Separates style from structure
  • Allows styles to be stored externally, making documents smaller and easier to maintain

Types of CSS

  1. Inline Styles: Written within HTML tags
  2. Embedded Styles: Added within <style> tags in the <head>
  3. External Styles: Stored in separate .css files, linked to HTML
  4. Imported Styles: Styles from one CSS file imported into another

CSS Syntax

  • Rule Structure: Each rule has a selector and a declaration
  • Example:
Read More

Essential String Algorithms in C++

Find the Longest Common Prefix

#include <iostream>
#include <vector>
#include <string>

using namespace std;

string longestCommonPrefix(vector<string>& strs) {
    if (strs.empty()) return "";
    string prefix = strs[0];

    for (int i = 1; i < strs.size(); i++) {
        int j = 0;
        while (j < strs[i].length() && j < prefix.length() && strs[i][j] == prefix[j]) {
            j++;
        }
        prefix = prefix.substr(0, j);
       
Read More

Cisco Networking Cheat Sheet

Cisco Certification Acronyms

CCNA: Cisco Certified Network Associate
CCNP: Cisco Certified Network Professional
CCSP: Cisco Certified Security Professional

Device Acronyms

ASA: Adaptive Security Appliance
FWSM: Firewall Service Module
CSM: Content Switching Module version 3.2 SP2
IPS: Intrusion Prevention System
ACS: Access Control Security

Protocol Acronyms

SNMP: Simple Network Management Protocol
TCP: Transfer Control Protocol
UDP: User Datagram Protocol
ICMP: Internet Control Message Protocol

osi

IOS Commands

Privileged

Read More

Fundamentals of Computer Programming

Topic 1: Introduction to Computers

Computer: A collection of scientific knowledge, techniques, and technologies enabling automatic data processing.

Computer System: A system processing information through interrelated entities: hardware (processor), software (program), and peopleware (user).

Item 2: Programming and Languages

Software: A set of instructions directing the computer precisely and accurately.

Programs are not intelligent, lack initiative, imagination, and inventiveness.

Model: A simplified

Read More

Dart Streams and SQLite Data Management

1. Single vs. Broadcast Streams

Single Subscription Streams

  • Allow only one listener at a time.
  • Ideal for sequential data processing (e.g., file reading, API calls).
  • Example: File I/O, HTTP requests.

Broadcast Streams

  • Allow multiple listeners simultaneously.
  • Best for real-time data/event broadcasting (e.g., WebSocket updates, UI events).
  • Example: Button clicks, live data updates.

Code Example

import 'dart:async';

void main() {
  // Single subscription stream
  StreamController<String> singleController 
Read More