Tagged articles
20 articles
Page 1 of 1
Code Wrench
Code Wrench
Dec 12, 2025 · Backend Development

Master CGO: Deep Dive into Go‑C Interoperability, Performance & Interview Secrets

This article provides a comprehensive, low‑level explanation of Go’s CGO bridge, covering its purpose, performance overhead, scheduler interaction, pointer safety rules, memory‑management guidelines, common use‑cases, scenarios to avoid, optimization techniques, and a collection of high‑frequency interview questions with model answers.

GoInteroperabilitycgo
0 likes · 8 min read
Master CGO: Deep Dive into Go‑C Interoperability, Performance & Interview Secrets
php Courses
php Courses
Jun 25, 2025 · Backend Development

Master CGO: Seamlessly Integrate C Libraries into Go Projects

This comprehensive guide explains CGO fundamentals, demonstrates basic and advanced usage with practical code examples, covers type conversion, calling C standard libraries, handling external C files, callbacks, struct passing, memory‑management best practices, real‑world scenarios, limitations, and alternative approaches for Go developers.

C integrationGoInterop
0 likes · 9 min read
Master CGO: Seamlessly Integrate C Libraries into Go Projects
FunTester
FunTester
Jan 10, 2025 · Backend Development

Seamlessly Call Go Functions from Java Using JNI: A Step‑by‑Step Guide

Learn how to integrate Go and Java by compiling Go code into a shared library, exposing functions via cgo and JNI, and invoking them from Java with detailed setup, code examples, handling of primitive and complex data types, and full build‑and‑run instructions.

GoInteroperabilityJNI
0 likes · 12 min read
Seamlessly Call Go Functions from Java Using JNI: A Step‑by‑Step Guide
Linux Kernel Journey
Linux Kernel Journey
Nov 30, 2024 · Fundamentals

How a SIGPIPE Signal Crashed Our Service and the Fix We Applied

During a gray‑release, a Go‑Rust service repeatedly crashed when a dependent process was hot‑upgraded; the root cause was an unhandled SIGPIPE signal generated by the kernel on a broken TCP connection, which terminated the process without a core dump, and the article explains the kernel mechanics and the solution of ignoring SIGPIPE.

GoLinux signalsRust
0 likes · 16 min read
How a SIGPIPE Signal Crashed Our Service and the Fix We Applied
IT Services Circle
IT Services Circle
May 25, 2024 · Backend Development

Calling Go Functions from C: Implementation Steps and Underlying Mechanism

This article explains how to call Go functions from C within the same process, covering the three‑step implementation, compilation into a shared library, the C invocation code, and a detailed walkthrough of the cgo and Go runtime mechanisms that make cross‑language calls possible.

Cross-languageInteroperabilitycgo
0 likes · 13 min read
Calling Go Functions from C: Implementation Steps and Underlying Mechanism
Shopee Tech Team
Shopee Tech Team
Jun 2, 2022 · Backend Development

Applying GPU Technology for High‑Throughput Image Rendering in Shopee Off‑Platform Ads

The Shopee Off‑Platform Ads team built a GPU‑accelerated Creative Rendering System that uses a four‑layer architecture, CGO‑bridged C/C++ kernels, and template caching to process billions of product images daily, achieving roughly ten‑fold speedup, half the cost, and far reduced rack space while handling high concurrency.

AdvertisingCUDAGPU
0 likes · 23 min read
Applying GPU Technology for High‑Throughput Image Rendering in Shopee Off‑Platform Ads
Sohu Tech Products
Sohu Tech Products
Apr 13, 2022 · Backend Development

Understanding Go Memory Leaks and Using pprof for Profiling

This article explains why Go programs can still exhibit memory growth despite automatic garbage collection, describes how to identify and diagnose such issues with the built‑in pprof tool, and details the underlying sampling mechanism, memory fragmentation, and cgo‑related allocations.

GoProfilingRuntime
0 likes · 9 min read
Understanding Go Memory Leaks and Using pprof for Profiling
Tencent Cloud Developer
Tencent Cloud Developer
Aug 30, 2021 · Backend Development

Troubleshooting Golang Memory Leaks: A Production Case Study

The case study walks through debugging a Go production service that regularly spiked to over 6 GB of resident memory, revealing that unbuffered channel leaks, mis‑configured HTTP client timeouts, and ultimately a cgo‑based image‑processing library spawning unmanaged threads caused the leaks, and outlines a systematic troubleshooting workflow.

DebuggingGolangGoroutine
0 likes · 12 min read
Troubleshooting Golang Memory Leaks: A Production Case Study
Tencent Cloud Developer
Tencent Cloud Developer
Aug 23, 2021 · Backend Development

Performance Optimization Techniques for Go Standard Library

The article surveys a range of Go standard‑library performance tricks—from using sync.Pool and zero‑copy string/byte conversions to reducing lock contention, leveraging go:linkname, caching call‑frame data, optimizing cgo calls, employing custom epoll, SIMD, and occasional JIT—while urging profiling‑first, readability‑preserving optimizations.

Gocgosync.Pool
0 likes · 17 min read
Performance Optimization Techniques for Go Standard Library
dbaplus Community
dbaplus Community
Jun 13, 2018 · Databases

How to Build a PostgreSQL FDW with Go: From Theory to Practice

This article explains the history and architecture of PostgreSQL's Foreign Data Wrapper (FDW), details the required database objects and callback functions, and provides a step‑by‑step guide for implementing an FDW in Go using cgo, including code examples, build instructions, and performance considerations.

Database ExtensionFDWGo
0 likes · 26 min read
How to Build a PostgreSQL FDW with Go: From Theory to Practice