Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: Aliasing text and data segments of a process Message-ID: <7176@brl-smoke.ARPA> Date: 25 Jan 88 00:00:29 GMT References: <202@sdti.UUCP> <3106@super.upenn.edu> <453@minya.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <453@minya.UUCP> jc@minya.UUCP (John Chambers) writes: >Sure enough, there is supposedly separate address spaces for both... You have to ask the linker for this feature, assuming your hardware and OS support it; it's not the default. >| code = (char*)malloc(1000); code -> D-space. >| fct = (int(*)())code; /* Point to the malloc()ed data area */ >| i = (*fct)(7,9); /* Call the copy */ If this works, you do not have split I&D space.